function msort($list, $method)libphutil Technical Documentation (Core Utilities)
Sort a list of objects by the return value of some method. In PHP, this is often vastly more efficient than usort() and similar.
// Sort a list of Duck objects by name. $sorted = msort($ducks, 'getName');
It is usually significantly more efficient to define an ordering method on objects and call msort() than to write a comparator. It is often more convenient, as well.
|list||$list||List of objects to sort by some property.|
|string||$method||Name of a method to call on each object; the return values will be used to sort the list.|
|list||Objects ordered by the return values of the method calls.|