On Sun, Sep 19, 2021 at 3:11 PM tyson andre <tysonandre...@hotmail.com>
wrote:

> Hi internals,
>
> Currently, array_filter will always return the original keys.
> This often requires an additional wrapping call of
> array_values(array_filter(...)) to reindex the keys and return a list.
> (or applications may not realize there will be gaps in the keys until it
> causes a bug or unexpected JSON encoding, etc.)
>

Hi,

This "issue" is not limited to array_filter(), there's also array_unique()
and even array_diff()/array_intersect() whose variadic signature doesn't
allow to add a flag (I think?)...

PS: and array_column() has the opposite issue...

-- 
Guilliam Xavier

Reply via email to