A collection class for working with arrays
- Immutable - Most methods return a new collection, leaving the previous untouched
- Chainable - Methods can be chained to create fluent mapping and reduce original collection
- PHP v5.3
- Composer
$ composer require jjgrainger/collection
$collection = new Collection([1, 2, 3]);
$total = $collection->sum(); // 6