src/Difference/DifferenceSequenceMatcher.php
private function tupleSort($a, $b)
    {
        $aLength = count($a);
        $bLength = count($b);

        if ($aLength > $bLength) {
            $max = $aLength;
        } else {
            $max = $bLength;
        }

        for ($i = 0; $i < $max; ++$i) {
            if ($a[$i] < $b[$i]) {
                return -1;
            }

            if ($a[$i] > $b[$i]) {
                return 1;
            }
        }

        return $aLength <=> $bLength;
    }
private function tupleSort($a, $b)
    {
        $aLength = count($a);
        $bLength = count($b);

        if ($aLength > $bLength) {
            $max = $aLength;
        } else {
            $max = $bLength;
        }

        for ($i = 0; $i < $max; ++$i) {
            if ($a[$i] < $b[$i]) {
                return -1;
            }

            if ($a[$i] > $b[$i]) {
                return 1;
            }
        }

        return $aLength <=> $bLength;
    }
private function tupleSort ( $ a , $ b ) { $ aLength = count ( $ a ) ; $ bLength = count ( $ b ) ; if ( $ aLength > $ bLength ) { $ max = $ aLength ; } else { $ max = $ bLength ; } for ( $ i = 0 ; $ i < $ max ; ++ $ i ) { if ( $ a [ $ i ] < $ b [ $ i ] ) { return - 1 ; } if ( $ a [ $ i ] > $ b [ $ i ] ) { return 1 ; } } return $ aLength <=> $ bLength ; }
Sort an array by the nested arrays it contains. Helper function for getMatchingBlocks.

@param array $a First array to compare.
@param array $b Second array to compare.

@return int -1, 0 or 1, as expected by the usort function.
Sort an array by the nested arrays it contains . Helper function for getMatchingBlocks .