Re: [discussion] add array_usearch()
2014-02-06 Tjerk Meesters <[email protected]>:
> Hi internals,
>
> To complement array_search(), I'm gauging the interest in adding the
> following function:
>
> mixed array_usearch(array $haystack, callable $fn, int $flags = 0)
>
> It returns the first array key from a given haystack for which the callback
> function returns a truthy value [1] or false
otherwise. The callback
> function receives the array item as its only argument [2].
>
>
Tjerk,
This feels alot like array_filter.. Do we really want to introduce yet
another way of doing almost the same?
Regards,
Robin Speekenbrink
Thread (11 messages)