Utility/ArrayObjectA.php
public function group(callable $callback) {
		$array = array();
		foreach ($this->getIterator() as $index => $item) {
			$group = $callback($item);
			$array[$group][] = $item;
		}
		return new static($array);
	}
public function group(callable $callback) {
		$array = array();
		foreach ($this->getIterator() as $index => $item) {
			$group = $callback($item);
			$array[$group][] = $item;
		}
		return new static($array);
	}
public function group ( callable $ callback ) { $ array = array ( ) ; foreach ( $ this -> getIterator ( ) as $ index => $ item ) { $ group = $ callback ( $ item ) ; $ array [ $ group ] [ ] = $ item ; } return new static ( $ array ) ; }
Group elements of array

@param callable $callback
@return \ArrayObjectA
Group elements of array