On Tue, May 30, 2023, at 4:27 PM, Boro Sitnikovski wrote:
> Hi,
>
> Thank you for your thoughts.
>
>> I would say the more common desired behavior is the one in your first
>> example. And even for that we don't have a native function.
>
> This Google search might give more insight into the number of 
> discussions about a grouping functionality: 
> https://www.google.com/search?q=php+group+elements+site:stackoverflow.com
>
>> Your behavior can be implemented in userland like so:
>> https://3v4l.org/epvHm
>
> Correct, but then again, we can also implement 
> `array_map`/`array_filter`/etc. in userland :)
>
>> I think you need to make a case as to why the behavior you describe
>> justifies a native function.
>
> Similar to my previous answer, but also in general - ease of access and 
> also performance.

Do you have benchmarks showing that implementing it in C would be notably 
faster?  That would help the case that it should be written in C.

Also, please do not top-post.

--Larry Garfield

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

Reply via email to