Hi Máté, pon., 17 kwi 2023 o 08:32 Máté Kocsis <kocsismat...@gmail.com> napisał(a):
> Hi Everyone, > > Quite some time after mentioning the "clone with" construct the first time > (at the end of the > https://wiki.php.net/rfc/write_once_properties#run-time_behaviour > section), > finally I managed to create a working implementation for this feature which > would make it possible to properly modify readonly properties > while simplifying how we write "wither" methods: > https://wiki.php.net/rfc/clone_with Thanks for your efforts and for bringing that up. I am curious if possible to implement the feature without using `with` keyword it visually could look pretty close to something like an object initializer in the future: return clone $this {c: 1}; return new Bar {c: 1}; Cheers, Michał Marcin Brzuchalski