public static function compareVersionRange($version, $range)
    {

        if ($range == '' || $version == '') {
            return true;
        }

        if (is_string($version)) {
            $v1 = Parser::parse($version);
        }
        else {
            $v1 = $version;
        }

        if ($v1->toString(true, false) == $range) {
            return true;
        }

        $expression = self::compileRange($range);

        return $expression->compare($v1);
    }