lib/magento/Package.php
public function checkPhpVersion()
    {
        $min = $this->getDependencyPhpVersionMin();
        $max = $this->getDependencyPhpVersionMax();

        $minOk = $min? version_compare(PHP_VERSION, $min, ">=") : true;
        $maxOk = $max? version_compare(PHP_VERSION, $max, "<=") : true;

        if(!$minOk || !$maxOk) {
            $err = "requires PHP version ";
            if($min && $max) {
                $err .= " >= $min and <= $max ";
            } elseif($min) {
                $err .= " >= $min ";
            } elseif($max) {
                $err .=  " <= $max ";
            }
            $err .= " current is: ".PHP_VERSION;
            return $err;
        }
        return true;
    }
public function checkPhpVersion()
    {
        $min = $this->getDependencyPhpVersionMin();
        $max = $this->getDependencyPhpVersionMax();

        $minOk = $min? version_compare(PHP_VERSION, $min, ">=") : true;
        $maxOk = $max? version_compare(PHP_VERSION, $max, "<=") : true;

        if(!$minOk || !$maxOk) {
            $err = "requires PHP version ";
            if($min && $max) {
                $err .= " >= $min and <= $max ";
            } elseif($min) {
                $err .= " >= $min ";
            } elseif($max) {
                $err .=  " <= $max ";
            }
            $err .= " current is: ".PHP_VERSION;
            return $err;
        }
        return true;
    }
public function checkPhpVersion ( ) { $ min = $ this -> getDependencyPhpVersionMin ( ) ; $ max = $ this -> getDependencyPhpVersionMax ( ) ; $ minOk = $ min ? version_compare ( PHP_VERSION , $ min , ">=" ) : true ; $ maxOk = $ max ? version_compare ( PHP_VERSION , $ max , "<=" ) : true ; if ( ! $ minOk || ! $ maxOk ) { $ err = "requires PHP version " ; if ( $ min && $ max ) { $ err .= " >= $min and <= $max " ; } elseif ( $ min ) { $ err .= " >= $min " ; } elseif ( $ max ) { $ err .= " <= $max " ; } $ err .= " current is: " . PHP_VERSION ; return $ err ; } return true ; }
Check PHP version restriction
@param $phpVersion PHP_VERSION by default
@return true | string
Check PHP version restriction