public static function compareIdentifiers(array $left, array $right)
    {
        if ($left && empty($right)) {
            return self::LESS_THAN;
        } elseif (empty($left) && $right) {
            return self::GREATER_THAN;
        }

        $l = $left;
        $r = $right;
        $x = self::GREATER_THAN;
        $y = self::LESS_THAN;

        if (count($l) < count($r)) {
            $l = $right;
            $r = $left;
            $x = self::LESS_THAN;
            $y = self::GREATER_THAN;
        }

        foreach (array_keys($l) as $i) {
            if (!isset($r[$i])) {
                return $x;
            }

            if ($l[$i] === $r[$i]) {
                continue;
            }

            if (true === ($li = (false != preg_match('/^\d+$/', $l[$i])))) {
                $l[$i] = intval($l[$i]);
            }

            if (true === ($ri = (false != preg_match('/^\d+$/', $r[$i])))) {
                $r[$i] = intval($r[$i]);
            }

            if ($li && $ri) {
                return ($l[$i] > $r[$i]) ? $x : $y;
            } elseif (!$li && $ri) {
                return $x;
            } elseif ($li && !$ri) {
                return $y;
            }

            $result = strcmp($l[$i], $r[$i]);

            if ($result > 0) {
                return $x;
            } elseif ($result < 0) {
                return $y;
            }
        }

        return self::EQUAL_TO;
    }