← All docs

array_any()

Returns true when at least one array element satisfies the predicate callback.

array_any()

function array_any(mixed $array, mixed $callback): bool

Returns true when at least one array element satisfies the predicate callback.

Parameters:

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

Returns: bool

Availability

  • Compiled (AOT): supported by the Elephc code generator.
  • eval() (magician interpreter): not available inside eval’d code.

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

Internals

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