Hi internals, 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. If this turns out to be more complex than anticipated, for some reason, specifically around syntax or BC implications, we'd rather not add this at all. A preliminary implementation that shows how small the change set needs to be exists at https://github.com/TimWolla/php-src/pull/6 Kind Regards, Tim and Volker -- Volker Dusch Head of Engineering Tideways GmbH Königswinterer Str. 116 53227 Bonn https://tideways.io/imprint Sitz der Gesellschaft: Bonn Geschäftsführer: Benjamin Außenhofer (geb. Eberlei) Registergericht: Amtsgericht Bonn, HRB 22127