This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('array_group_by')) { | |
/** | |
* Groups an array by a given key. | |
* | |
* Groups an array into arrays by a given key, or set of keys, shared between all array members. | |
* | |
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function. | |
* This variant allows $key to be closures. |