← 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
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/array_walk.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how array_walk is implemented in the compiler, see the internals page.