Re: RFC [Discussion] array_column results grouping
| From: | Rowan Tommins | Date: | Sun, 05 Dec 2021 14:02:03 +0000 |
| Subject: | Re: RFC [Discussion] array_column results grouping | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116571@lists.php.net to get a copy of this message | ||
On 05/12/2021 10:41, Mark Randall wrote:
On 04/12/2021 14:21, Marco Pivetta wrote: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]Gonna voteI would vote no for the same reason.noon this: please design new/dedicated functions, rather than expanding optional parameters.