array_reduce()
function array_reduce(array $array, callable $callback, mixed $initial = null): int
Iteratively reduces an array to a single value using a callback function.
Parameters:
$array(array)$callback(callable)$initial(mixed), defaultnull, optional
Returns: int
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how array_reduce is implemented in the compiler, see the internals page.