<?php each: _::each([1, 2, 3], function ($i) { echo $i; }); // => 123 _::each((object) ['a' => 1, 'b' => 2, 'c' => 3], function ($value, $key) { echo "{$key} => {$value}\n"; }); // => displays each pair in turn eachReference: $numbers = [1, 2, 3]; _::eachReference($numbers, function (&$value) { $value *= $value; }); // => [1,4,9] map: _::map([1, 2, 3], function ($value) { return $value - 1; }); // => [0,1,2] reduce: $sum = _::reduce([1, 2, 3], function ($memo, $num) { return $memo + $num; }, 0); // => 6 reduceRight: $list = [[0, 1], [2, 3], [4, 5]]; $flat = _::reduceRight($list, function ($a, $b) { return array_merge($a, $b);