Inpsyde\MultilingualPress\Installation\SystemChecker::check_php_version PHP Метод

check_php_version() приватный Метод

Checks if the current PHP version is the required version higher, and collects potential error messages.
private check_php_version ( ) : void
Результат void
    private function check_php_version()
    {
        $current_version = $this->type_factory->create_version_number([phpversion()]);
        $required_version = $this->type_factory->create_version_number([self::MINIMUM_PHP_VERSION]);
        if (version_compare($current_version, $required_version, '>=')) {
            return;
        }
        /* translators: 1: required PHP version, 2: current PHP version */
        $message = esc_html__('This plugin requires PHP version %1$s, your version %2$s is too old. Please upgrade.', 'multilingual-press');
        $this->errors[] = sprintf($message, $required_version, $current_version);
    }