mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Code Modernization: Replace phpversion() function calls with PHP_VERSION constant.
`phpversion()` return value and `PHP_VERSION` constant value are identical, but the latter is several times faster because it is a direct constant value lookup compared to a function call. Props ayeshrajans, jrf, mukesh27, costdev, hellofromTonya, SergeyBiryukov. Fixes #55680. git-svn-id: https://develop.svn.wordpress.org/trunk@53426 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -677,23 +677,18 @@ class WP_Debug_Data {
|
||||
$server_architecture = 'unknown';
|
||||
}
|
||||
|
||||
if ( function_exists( 'phpversion' ) ) {
|
||||
$php_version_debug = phpversion();
|
||||
// Whether PHP supports 64-bit.
|
||||
$php64bit = ( PHP_INT_SIZE * 8 === 64 );
|
||||
$php_version_debug = PHP_VERSION;
|
||||
// Whether PHP supports 64-bit.
|
||||
$php64bit = ( PHP_INT_SIZE * 8 === 64 );
|
||||
|
||||
$php_version = sprintf(
|
||||
'%s %s',
|
||||
$php_version_debug,
|
||||
( $php64bit ? __( '(Supports 64bit values)' ) : __( '(Does not support 64bit values)' ) )
|
||||
);
|
||||
$php_version = sprintf(
|
||||
'%s %s',
|
||||
$php_version_debug,
|
||||
( $php64bit ? __( '(Supports 64bit values)' ) : __( '(Does not support 64bit values)' ) )
|
||||
);
|
||||
|
||||
if ( $php64bit ) {
|
||||
$php_version_debug .= ' 64bit';
|
||||
}
|
||||
} else {
|
||||
$php_version = __( 'Unable to determine PHP version' );
|
||||
$php_version_debug = 'unknown';
|
||||
if ( $php64bit ) {
|
||||
$php_version_debug .= ' 64bit';
|
||||
}
|
||||
|
||||
if ( function_exists( 'php_sapi_name' ) ) {
|
||||
|
||||
Reference in New Issue
Block a user