PHP 8.5.0 Released!

Voting

: min(nine, eight)?
(Example: nine)

The Note You're Voting On

harl at gmail dot com
15 days ago
Note that if null satisfies the callback then there is no way to tell if null was returned because it was found in the array or if it was because nothing satisfying the callback was found.

In this case, it'll be more robust to use array_find_key; null can't be a key, so if that's what you get it must be because the search failed to find a match.

Obviously, you'd then use the array key to look up the corresponding value in the array.

<< Back to user notes page

To Top