Re: [RFC] [Discussion] Clone with
| From: | Rowan Tommins | Date: | Tue, 18 Apr 2023 08:10:00 +0000 |
| Subject: | Re: [RFC] [Discussion] Clone with | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120062@lists.php.net to get a copy of this message | ||
On 17/04/2023 07:32, Máté Kocsis wrote:
https://wiki.php.net/rfc/clone_withI look the look of this; very concise. A couple of clarifications that might be useful to add to the RFC: 1) You mention in the Alternatives sometimes needing access to the original instance; it would be good to have an example of how this looks with the clone-with syntax. 2) How does this interact with an __clone() method? I'm guessing the __clone() would be called first, and then the with-clause applied? Regards, -- Rowan Tommins [IMSoP]