lib/VersionComparator.php
public static function compareVersion($version1, $version2)
    {
        if ($version1 == $version2) {
            return 0;
        }

        $v1 = Parser::parse($version1);
        $v2 = Parser::parse($version2);

        return self::compare($v1, $v2);
    }
public static function compareVersion($version1, $version2)
    {
        if ($version1 == $version2) {
            return 0;
        }

        $v1 = Parser::parse($version1);
        $v2 = Parser::parse($version2);

        return self::compare($v1, $v2);
    }
public static function compareVersion ( $ version1 , $ version2 ) { if ( $ version1 == $ version2 ) { return 0 ; } $ v1 = Parser :: parse ( $ version1 ) ; $ v2 = Parser :: parse ( $ version2 ) ; return self :: compare ( $ v1 , $ v2 ) ; }
Compare two version as string.

It supports wildcard in one of the version

@param string $version1
@param string $version2

@return int 0 if equal, -1 if $version1 < $version2, 1 if $version1 > $version2
Compare two version as string .