On Wed, May 14, 2025 at 8:06 AM Volker Dusch <vol...@tideways-gmbh.com> wrote:
> A couple of weeks ago, we stumbled over the fact that the original "clone > with" RFC was abandoned and thought it would still be useful to suggest a > trimmed down version of the proposal. > > The main goal of this RFC is to propose a lightweight, low friction > implementation of this feature to satisfy the couple of use cases we see > and "round out" PHP in how it handles cloning, especially around > read-only-properties. > > https://wiki.php.net/rfc/clone_with_v2 > > We are actively looking for some feedback on > https://wiki.php.net/rfc/clone_with_v2#open_issues, but of course all > points are welcome. > The only question that arose for me is: what happens if a property name is provided to `clone()` that does not exist in the class definition; what will be the behavior at that time? Will an exception or error be thrown? If so, will it be a new one, or an existing one? -- Matthew Weier O'Phinney mweierophin...@gmail.com https://mwop.net/ he/him