is_php_version_compatible() WordPress Function

The is_php_version_compatible() function is used to check whether the current PHP version is compatible with a given WordPress version.

is_php_version_compatible( string $required ) #

Checks compatibility with the current PHP version.


Parameters

$required

(string)(Required)Minimum required PHP version.


Top ↑

Return

(bool) True if required version is compatible or empty, false if not.


Top ↑

Source

File: wp-includes/functions.php

function is_php_version_compatible( $required ) {
	return empty( $required ) || version_compare( phpversion(), $required, '>=' );
}


Top ↑

Changelog

Changelog
VersionDescription
5.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More