ALIAS

reduce()

ShortPHP reference for array_reduce().

Signature

array_reduce(array $array, callable $callback, mixed $initial = null): mixed

Example

reduce(...);

PHP equivalent

array_reduce() is the canonical PHP function. ShortPHP provides reduce() as the convenience alias.

Extension: Core

Official PHP manual ↗

Reference navigation

Previous: merge()

Next: vals()

Back to reference