Hi On 10/15/23 05:48, Saki Takamachi wrote:
I came up with the idea of using a signature like array_filter(), and when a callback is passed, "return the first/last element that matches the condition" and "return null if there is no match."
This would be 'array_find()' and I would be in favor of it, with the caveat that I would want it to work with arbitrary iterables.
See this previous thread regarding that topic: https://externals.io/message/118896#118896 Best regards Tim Düsterhus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php