This package is abandoned and no longer maintained. The author suggests using the cubicl/php-sorting package instead.

A sorting library for PHP

0.1.0 2017-07-17 20:41 UTC

This package is auto-updated.

Last update: 2019-03-26 13:30:17 UTC


Build Status

Implementation of a generic sorting system with an interface definition compatible to the Comparable RFC.


You have two possible options. Depending on your use case you can implement the Sorting\Comparable interface or use a comparator.


// with a comparable
$orderedList = $sortManager->sortComparable($unorderedListOfComparable);

// or with a comparator
$orderedList = $sortManager->sortWithComparator($comparator, $unorderedList);