private function doCmp(string $a, string $b) : int
    {
        $x = \strlen($a);
        $y = \strlen($b);

        $cmp = $x <=> $y;

        if ($cmp !== 0) {
            return $cmp;
        }

        return \strcmp($a, $b) <=> 0; // enforce [-1, 0, 1]
    }
private function doCmp(string $a, string $b) : int
    {
        $x = \strlen($a);
        $y = \strlen($b);

        $cmp = $x <=> $y;

        if ($cmp !== 0) {
            return $cmp;
        }

        return \strcmp($a, $b) <=> 0; // enforce [-1, 0, 1]
    }
private function doCmp ( string $ a , string $ b ) : int { $ x = \ strlen ( $ a ) ; $ y = \ strlen ( $ b ) ; $ cmp = $ x <=> $ y ; if ( $ cmp !== 0 ) { return $ cmp ; } return \ strcmp ( $ a , $ b ) <=> 0 ; // enforce [-1, 0, 1] }
Compares two non-signed large numbers.

@param string $a The first operand.
@param string $b The second operand.

@return int [-1, 0, 1]
Compares two non - signed large numbers .