wpseek.com
A WordPress-centric search engine for devs and theme authors



is_php_version_compatible › WordPress Function

Since5.2.0
Deprecatedn/a
is_php_version_compatible ( $required )
Parameters:
  • (string) $required Minimum required PHP version.
    Required: Yes
Returns:
  • (bool) True if required version is compatible or empty, false if not.
Defined at:
Codex:

Checks compatibility with the current PHP version.



Source

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