WordPress at a glance

is_php_version_compatible() WP 1.0

Checks compatibility with the current PHP version.

✈ 1 time = 0.000001s = speed of light | 50000 times = 0.02s = speed of light | PHP 7.2.16, WP 5.2

No Hooks.

Return

true/false. True if required version is compatible or empty, false if not.

Usage

is_php_version_compatible( $required );
$required(string) (required)
Minimum required PHP version.

Code of is php version compatible: wp-includes/functions.php WP 5.2.2

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

Related Functions

From category: Helper Functions

No comments
    Hello, !     Log In . Register