src/Collection/ImmArray.php
public function sort(callable $cb = null)
    {
        if ($cb) {
            // Custom searches can be easier on memory, but run absurdly slow
            // pre PHP7
            if (PHP_MAJOR_VERSION < 7) {
                return $this->arraySort($cb);
            }
            return $this->mergeSort($cb);
        }
        return $this->arraySort();
    }
public function sort(callable $cb = null)
    {
        if ($cb) {
            // Custom searches can be easier on memory, but run absurdly slow
            // pre PHP7
            if (PHP_MAJOR_VERSION < 7) {
                return $this->arraySort($cb);
            }
            return $this->mergeSort($cb);
        }
        return $this->arraySort();
    }
public function sort ( callable $ cb = null ) { if ( $ cb ) { // Custom searches can be easier on memory, but run absurdly slow // pre PHP7 if ( PHP_MAJOR_VERSION < 7 ) { return $ this -> arraySort ( $ cb ) ; } return $ this -> mergeSort ( $ cb ) ; } return $ this -> arraySort ( ) ; }
Return a new sorted ImmArray

@param callable $cb The sort callback
@return static
Return a new sorted ImmArray