You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> doc array_reduce
function array_reduce($arg, $callback, $initial = unknown)
Description:
Iteratively reduce the array to a single value using a callback function
array_reduce applies iteratively the callback function to the elements of the array, so as
to reduce the array to a single value.
Param:
array $array The input array.
callable $callback Holds the return value of the previous iteration; in the case of the first
iteration it instead holds the value of initial.
Holds the value of the current iteration.
mixed $carry Holds the return value of the previous iteration; in the case of the first
iteration it instead holds the value of initial.
mixed $item Holds the value of the current iteration.
mixed $initial If the optional initial is available, it will be used at the beginning of
the process, or as a final result in case the array is empty.
Return:
mixed Returns the resulting value.
If the array is empty and initial is not passed, array_reduce returns null.
problem 1: $carry and $item are idented on the php website, but not in psysh
problem 2: double sentences such as Holds the value of the current iteration
problem 3: missing information function header mixed callback ( mixed $carry , mixed $item )
The text was updated successfully, but these errors were encountered:
consider:
Reference: http://php.net/manual/en/function.array-reduce.php
problem 1: $carry and $item are idented on the php website, but not in psysh
problem 2: double sentences such as
Holds the value of the current iteration
problem 3: missing information function header
mixed callback ( mixed $carry , mixed $item )
The text was updated successfully, but these errors were encountered: