Version 1.1 Update: Array syntax over named arguments. Thank you everyone for the discussion and for improving this RFC. I'm very happy with the updates we made thanks to your feedback on and off list.
The main idea of this RFC was to have as little of a footprint as possible and make it feel natural in PHP. I got carried away a bit during writing this, and by using named arguments, introduced something that isn't used in php-src provided functions, had edge cases that required documentation, and all in all, didn't feel natural in PHP but like an inconsistency. PHP uses arrays to pass lists everywhere else, so changing this here feels like too much scope for this little change. I'm very happy this was caught and raised in the discussions. Thank you. If there is desire for named-parameter-as-an-array syntax this should be standalone RFC with more scope than a single function. We've updated the RFC and the implementation, removing the "Open Issue" listed before, as this change resolved all of them. - https://wiki.php.net/rfc/clone_with_v2 - https://github.com/TimWolla/php-src/pull/6 -- 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