Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Hendra Gunawan
> > Better map/filter/reduce primitives in PHP would be dandy, but they have > nothing to do with array grouping. They're a separate operation that should > be composed with grouping. Packing them all into a single function sounds > like a terrible idea. > > If we wanted that... that's called list

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Hendra Gunawan
> > Better map/filter/reduce primitives in PHP would be dandy, but they have > nothing to do with array grouping. They're a separate operation that should > be composed with grouping. Packing them all into a single function sounds > like a terrible idea. > > If we wanted that... that's called list

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Hendra Gunawan
Revision to my recommendation are: 1. signature: array_group( array|object $array, int|string|array $index_key, callable $reducer = null, callable $mapper = null, callable $filter = null, callable $sorter = null, ): array 2. `sorter` should

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Larry Garfield
On Mon, Dec 6, 2021, at 4:16 PM, Hendra Gunawan wrote: >> >> Hello Folks, Thanks a lot for your feedback, as already mentioned in >> the RFC and as mentioned by Rowan too a new function is an option. I >> think that mostly we will go with the new function option. >> I will try to edit the PR to add

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Hendra Gunawan
> > Hello Folks, Thanks a lot for your feedback, as already mentioned in > the RFC and as mentioned by Rowan too a new function is an option. I > think that mostly we will go with the new function option. > I will try to edit the PR to add a new function, does there any > suggestions/naming convent

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Hassan Ahmed
The named arguments are a great thing to set in mind, but I think that we will go to complicate it with optional arguments. there is a comment on the PR that asks for another option to preserve the sub-array index to be the new array index. also with the comments by `Hendra Gunawan` in mind. adding

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Mark Randall
On 05/12/2021 14:02, Rowan Tommins 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. I hope it was taken as nothing more than an indication that adding

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Claude Pache
> Le 6 déc. 2021 à 09:44, Hassan Ahmed <7sno...@gmail.com> a écrit : > > Hello Folks, Thanks a lot for your feedback, as already mentioned in > the RFC and as mentioned by Rowan too a new function is an option. I > think that mostly we will go with the new function option. > I will try to edit t

Re: [PHP-DEV] Automatic performance benchmarking: PHP 8.1 is ~30% faster than PHP 7.4

2021-12-06 Thread Patrick ALLAERT
Hi Máté, Le lun. 6 déc. 2021 à 10:00, Máté Kocsis a écrit : > > Hi Patrick, > >> >> Thank you for those stats. Would you have the chance to have some data >> including PHP 8.0 as well? >> Because without PHP 8.0 data, we can't deduce anything about what PHP >> 8.1 brings over PHP 8.0 and or 8.0 o

Re: [PHP-DEV] Automatic performance benchmarking: PHP 8.1 is ~30% faster than PHP 7.4

2021-12-06 Thread Máté Kocsis
Hi Patrick, > Thank you for those stats. Would you have the chance to have some data > including PHP 8.0 as well? > Because without PHP 8.0 data, we can't deduce anything about what PHP > 8.1 brings over PHP 8.0 and or 8.0 over 7.4. > Virtually, 8.1 may even be slower than 8.0 if the big increase

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-06 Thread Hassan Ahmed
Hello Folks, Thanks a lot for your feedback, as already mentioned in the RFC and as mentioned by Rowan too a new function is an option. I think that mostly we will go with the new function option. I will try to edit the PR to add a new function, does there any suggestions/naming conventions for the