WordPress开发者和主题制作者的搜索引擎



is_php_version_compatible ›

Since5.2.0
已弃用n/a
is_php_version_compatible ( $required )
参数:
  • (string) $required Minimum required PHP version.
    Required: Yes
返回:
  • (bool) True if required version is compatible or empty, false if not.
定义在:
文档:

Checks compatibility with the current PHP version.



源码

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