src/Semver.php
public static function satisfiedBy(array $versions, $constraints)
    {
        $versions = array_filter($versions, function ($version) use ($constraints) {
            return Semver::satisfies($version, $constraints);
        });

        return array_values($versions);
    }
public static function satisfiedBy(array $versions, $constraints)
    {
        $versions = array_filter($versions, function ($version) use ($constraints) {
            return Semver::satisfies($version, $constraints);
        });

        return array_values($versions);
    }
public static function satisfiedBy ( array $ versions , $ constraints ) { $ versions = array_filter ( $ versions , function ( $ version ) use ( $ constraints ) { return Semver :: satisfies ( $ version , $ constraints ) ; } ) ; return array_values ( $ versions ) ; }
Return all versions that satisfy given constraints.

@param array $versions
@param string $constraints

@return array
Return all versions that satisfy given constraints .