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. Built from https://develop.svn.wordpress.org/trunk@53426 git-svn-id: http://core.svn.wordpress.org/trunk@53015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1012,7 +1012,7 @@ function update_core( $from, $to ) {
|
||||
require WP_CONTENT_DIR . '/upgrade/version-current.php';
|
||||
$wp_filesystem->delete( $versions_file );
|
||||
|
||||
$php_version = phpversion();
|
||||
$php_version = PHP_VERSION;
|
||||
$mysql_version = $wpdb->db_version();
|
||||
$old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from.
|
||||
$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release.
|
||||
|
||||
Reference in New Issue
Block a user