public function sorted(callable $compare): self
    {
        $intervals = $this->intervals;
        usort($intervals, $compare);
        if ($intervals === $this->intervals) {
            return $this;
        }

        return new self(...$intervals);
    }
public function sorted(callable $compare): self
    {
        $intervals = $this->intervals;
        usort($intervals, $compare);
        if ($intervals === $this->intervals) {
            return $this;
        }

        return new self(...$intervals);
    }
public function sorted ( callable $ compare ) : self { $ intervals = $ this -> intervals ; usort ( $ intervals , $ compare ) ; if ( $ intervals === $ this -> intervals ) { return $ this ; } return new self ( ... $ intervals ) ; }
Returns an instance sorted according to the given comparison callable
but does not maintain index association.

This method MUST retain the state of the current instance, and return
an instance that contains the sorted intervals. The key are re-indexed
Returns an instance sorted according to the given comparison callable but does not maintain index association .