Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-22 Thread Hassan Ahmed
Hello Levi, maybe, I just was confused while I was rewriting it. any tips would be appreciated. On Tue, Dec 21, 2021 at 5:58 PM Levi Morrison wrote: > On Tue, Dec 21, 2021 at 1:48 AM Hassan Ahmed <7sno...@gmail.com> wrote: > > > > Hello all, > > > > I w

Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-21 Thread Hassan Ahmed
Brzuchalski < michal.brzuchal...@gmail.com> wrote: > Hello Hassan, > > wt., 21 gru 2021 o 09:48 Hassan Ahmed <7sno...@gmail.com> napisał(a): > >> Hello all, >> >> I would like to start a voting phase for this RFC: Add array_group >> function >> &

[PHP-DEV] [VOTE] Add array_group function

2021-12-21 Thread Hassan Ahmed
Hello all, I would like to start a voting phase for this RFC: Add array_group function Regards, ~Hassan

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

2021-12-12 Thread Hassan Ahmed
I already added a new function `array_group`, any further comments/thoughts will be highly appreciated. Regards, ~Hassan On Wed, Dec 8, 2021 at 11:35 AM Hassan Ahmed <7sno...@gmail.com> wrote: > > Hendra Gunawan IMHO your suggestions is not related to > `array_group()`, you ar

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

2021-12-08 Thread Hassan Ahmed
. but for array_group I think that we should keep it to the minimal, to only group array. ~Hassan Ahmed On Wed, Dec 8, 2021 at 1:26 AM Hendra Gunawan wrote: > > > > > And if you want to map, reduce, or filter without grouping? Then you can't > > really use this function. And as note

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

2021-12-07 Thread Hassan Ahmed
function to be `array_group($array, $index, $columns)` I will update the RFC with this. ~Hassan Ahmed. On Tue, Dec 7, 2021 at 5:01 AM Hendra Gunawan wrote: > > > > > Better map/filter/reduce primitives in PHP would be dandy, but they have > > nothing to do with array groupin

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

2021-12-06 Thread Hassan Ahmed
. adding a new optional argument will make it harder to expand it in the future. Hassan Ahmed On Mon, Dec 6, 2021 at 12:24 PM Claude Pache wrote: > > > > Le 6 déc. 2021 à 09:44, Hassan Ahmed <7sno...@gmail.com> a écrit : > > Hello Folks, Thanks a lot for your feedback, as alread

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

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

2021-12-04 Thread Hassan Ahmed
Hello, this is a proposal to upgrade the functionality of `array_column` to return an indexed array for all of the matched data instead of a single result. the RFC had been created here https://wiki.php.net/rfc/array_column_results_grouping and the PR is in here

[PHP-DEV] Re: Grouping array_column results

2021-11-28 Thread Hassan Ahmed
Hello Christoph, does there any way to update my username from `7snovic` to `hassan` ? On Sun, Nov 28, 2021 at 1:38 PM Hassan Ahmed <7sno...@gmail.com> wrote: > > Thanks a lot for your support. > > On Sun, Nov 28, 2021 at 1:18 PM Christoph M. Becker wrote: > > > >

[PHP-DEV] Re: Grouping array_column results

2021-11-28 Thread Hassan Ahmed
Thanks a lot for your support. On Sun, Nov 28, 2021 at 1:18 PM Christoph M. Becker wrote: > > On 28.11.2021 at 12:06, Hassan Ahmed wrote: > > > Hello Christoph, Thanks for your reply, I already created the account > > and now waiting for the account confirmation. Thanks

[PHP-DEV] Re: Grouping array_column results

2021-11-28 Thread Hassan Ahmed
Hello Christoph, Thanks for your reply, I already created the account and now waiting for the account confirmation. Thanks a lot. On Sun, Nov 28, 2021 at 12:46 PM Christoph M. Becker wrote: > > On 28.11.2021 at 09:16, Hassan Ahmed wrote: > > > however, I have an issue in crea

[PHP-DEV] Grouping array_column results

2021-11-28 Thread Hassan Ahmed
Hello, I started to edit the array_column function to accept the fourth parameter to group the similar results The current behavior is when you have multiple elements share the same key, it will be overwritten. let's assume that we have the following. ``` 1, 'name' => 'hassan'], ['id' => 2,