← All docs

array_walk()

Applies a user function to every member of an array. AOT boxed arrays pass a writable value reference and key to visible native callbacks. Escaping element references and opaque callback descriptors are unsupported.

array_walk()

function array_walk(array $array, callable $callback): bool

Applies a user function to every member of an array. AOT boxed arrays pass a writable value reference and key to visible native callbacks. Escaping element references and opaque callback descriptors are unsupported.

Parameters:

  • $array (array), passed by reference
  • $callback (callable)

Returns: bool

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

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