src/Semver.php
public static function satisfies($version, $constraints)
    {
        if (null === self::$versionParser) {
            self::$versionParser = new VersionParser();
        }

        $versionParser = self::$versionParser;
        $provider = new Constraint('==', $versionParser->normalize($version));
        $constraints = $versionParser->parseConstraints($constraints);

        return $constraints->matches($provider);
    }
public static function satisfies($version, $constraints)
    {
        if (null === self::$versionParser) {
            self::$versionParser = new VersionParser();
        }

        $versionParser = self::$versionParser;
        $provider = new Constraint('==', $versionParser->normalize($version));
        $constraints = $versionParser->parseConstraints($constraints);

        return $constraints->matches($provider);
    }
public static function satisfies ( $ version , $ constraints ) { if ( null === self :: $ versionParser ) { self :: $ versionParser = new VersionParser ( ) ; } $ versionParser = self :: $ versionParser ; $ provider = new Constraint ( '==' , $ versionParser -> normalize ( $ version ) ) ; $ constraints = $ versionParser -> parseConstraints ( $ constraints ) ; return $ constraints -> matches ( $ provider ) ; }
Determine if given version satisfies given constraints.

@param string $version
@param string $constraints

@return bool
Determine if given version satisfies given constraints .