application/Espo/Core/Utils/SystemRequirements.php
protected function checkPhpRequirements($type, $data, array $additionalData = null)
    {
        $list = [];

        switch ($type) {
            case 'requiredPhpVersion':
                $actualVersion = $this->getSystemHelper()->getPhpVersion();
                $requiredVersion = $data;

                $acceptable = true;
                if (version_compare($actualVersion, $requiredVersion) == -1) {
                    $acceptable = false;
                }

                $list[$type] = [
                    'type' => 'version',
                    'acceptable' => $acceptable,
                    'required' => $requiredVersion,
                    'actual' => $actualVersion,
                ];
                break;

            case 'requiredPhpLibs':
            case 'recommendedPhpLibs':
                foreach ($data as $name) {
                    $acceptable = $this->getSystemHelper()->hasPhpLib($name);

                    $list[$name] = array(
                        'type' => 'lib',
                        'acceptable' => $acceptable,
                        'actual' => $acceptable ? 'On' : 'Off',
                    );
                }
                break;

            case 'recommendedPhpParams':
                foreach ($data as $name => $value) {
                    $requiredValue = $value;
                    $actualValue = $this->getSystemHelper()->getPhpParam($name);

                    $acceptable = ( isset($actualValue) && Util::convertToByte($actualValue) >= Util::convertToByte($requiredValue) ) ? true : false;

                    $list[$name] = array(
                        'type' => 'param',
                        'acceptable' => $acceptable,
                        'required' => $requiredValue,
                        'actual' => $actualValue,
                    );
                }
                break;
        }

        return $list;
    }
protected function checkPhpRequirements($type, $data, array $additionalData = null)
    {
        $list = [];

        switch ($type) {
            case 'requiredPhpVersion':
                $actualVersion = $this->getSystemHelper()->getPhpVersion();
                $requiredVersion = $data;

                $acceptable = true;
                if (version_compare($actualVersion, $requiredVersion) == -1) {
                    $acceptable = false;
                }

                $list[$type] = [
                    'type' => 'version',
                    'acceptable' => $acceptable,
                    'required' => $requiredVersion,
                    'actual' => $actualVersion,
                ];
                break;

            case 'requiredPhpLibs':
            case 'recommendedPhpLibs':
                foreach ($data as $name) {
                    $acceptable = $this->getSystemHelper()->hasPhpLib($name);

                    $list[$name] = array(
                        'type' => 'lib',
                        'acceptable' => $acceptable,
                        'actual' => $acceptable ? 'On' : 'Off',
                    );
                }
                break;

            case 'recommendedPhpParams':
                foreach ($data as $name => $value) {
                    $requiredValue = $value;
                    $actualValue = $this->getSystemHelper()->getPhpParam($name);

                    $acceptable = ( isset($actualValue) && Util::convertToByte($actualValue) >= Util::convertToByte($requiredValue) ) ? true : false;

                    $list[$name] = array(
                        'type' => 'param',
                        'acceptable' => $acceptable,
                        'required' => $requiredValue,
                        'actual' => $actualValue,
                    );
                }
                break;
        }

        return $list;
    }
protected function checkPhpRequirements ( $ type , $ data , array $ additionalData = null ) { $ list = [ ] ; switch ( $ type ) { case 'requiredPhpVersion' : $ actualVersion = $ this -> getSystemHelper ( ) -> getPhpVersion ( ) ; $ requiredVersion = $ data ; $ acceptable = true ; if ( version_compare ( $ actualVersion , $ requiredVersion ) == - 1 ) { $ acceptable = false ; } $ list [ $ type ] = [ 'type' => 'version' , 'acceptable' => $ acceptable , 'required' => $ requiredVersion , 'actual' => $ actualVersion , ] ; break ; case 'requiredPhpLibs' : case 'recommendedPhpLibs' : foreach ( $ data as $ name ) { $ acceptable = $ this -> getSystemHelper ( ) -> hasPhpLib ( $ name ) ; $ list [ $ name ] = array ( 'type' => 'lib' , 'acceptable' => $ acceptable , 'actual' => $ acceptable ? 'On' : 'Off' , ) ; } break ; case 'recommendedPhpParams' : foreach ( $ data as $ name => $ value ) { $ requiredValue = $ value ; $ actualValue = $ this -> getSystemHelper ( ) -> getPhpParam ( $ name ) ; $ acceptable = ( isset ( $ actualValue ) && Util :: convertToByte ( $ actualValue ) >= Util :: convertToByte ( $ requiredValue ) ) ? true : false ; $ list [ $ name ] = array ( 'type' => 'param' , 'acceptable' => $ acceptable , 'required' => $ requiredValue , 'actual' => $ actualValue , ) ; } break ; } return $ list ; }
Check php requirements
@param  string $type
@param  mixed $data
@return array
Check php requirements