On 17/04/2023 07:32, Máté Kocsis wrote:
https://wiki.php.net/rfc/clone_with
I 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]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php