is_php_version_compatible( string $required ): bool

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. View all references

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


Top ↑

Changelog

Changelog
Version Description
5.2.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.