← All docs

array_find()

Returns the first element satisfying a predicate callback, or null.

array_find()

function array_find(mixed $array, mixed $callback): mixed

Returns the first element satisfying a predicate callback, or null.

Parameters:

  • $array (mixed)
  • $callback (mixed)

Returns: mixed

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how array_find is implemented in the compiler, see the internals page.