← All docs
array_search()
Searches the array for a given value and returns the first corresponding key if successful.
array_search()
function array_search(mixed $needle, array $haystack, bool $strict = false): mixed
Searches the array for a given value and returns the first corresponding key if successful.
Parameters:
$needle(mixed)$haystack(array)$strict(bool), defaultfalse, optional
Returns: mixed
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how array_search is implemented in the compiler, see the internals page.