On 05/12/2021 10:41, Mark Randall wrote:
On 04/12/2021 14:21, Marco Pivetta wrote:
Gonna vote `no` on this: please design new/dedicated functions, rather than
expanding optional parameters.


I would vote no for the same reason.


Since this is explicitly an open question in the current RFC draft, it seems a bit premature to talk about voting, rather than encouraging the RFC to develop in a particular direction.

For what it's worth, I agree that a new function is probably better here, because the argument list of array_column is already quite complicated. A new function also leaves the way open to add more functionality, such as the "reducer" callback suggested by Hendra Gunawan; I don't think that's needed in the first implementation, though.

In general, I like the proposal - like array_column itself, it's one of those things that's fairly _simple_ to do in userland, but also fairly _often_ done, so compacting it to a neat function call seems useful.

Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to