// "40" => ['name' => 'moe', 'age' => 40], // "50" => ['name' => 'larry', 'age' => 50], // "60" => ['name' => 'curly', 'age' => 60] // ] countBy: _::countBY([1, 2, 3, 4, 5], function ($num) { return $num % 2 == 0 ? 'even' : 'odd'; }); // => ['odd' => 3, 'even' => 2] shuffle: _::shuffle([1, 2, 3, 4, 5, 6]); // => [4, 1, 6, 3, 5, 2] sample: _::sample([1, 2, 3, 4, 5, 6]); // => 4 _::sample([1, 2, 3, 4, 5, 6], 3); // => [1, 6, 2] toArray: $object = new stdClass(); $object->one = 1; $object->two = 2; $object->three = 3; _::toArray($object); // => ['one' => 1, 'two' => 2, 'three' => 3] _::toArray(null); // => [] _::toArray("hello"); // => ["hello"] size: $object = new stdClass(); $object->one = 1;