public static function Version::compare in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/lib/Doctrine/Common/Version.php \Doctrine\Common\Version::compare()
Compares a Doctrine version with the current one.
Parameters
string $version Doctrine version to compare.:
Return value
int -1 if older, 0 if it is the same, 1 if version passed as argument is newer.
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Version.php, line 46
Class
- Version
- Class to store and retrieve the version of Doctrine.
Namespace
Doctrine\CommonCode
public static function compare($version) {
$currentVersion = str_replace(' ', '', strtolower(self::VERSION));
$version = str_replace(' ', '', $version);
return version_compare($version, $currentVersion);
}