Make WordPress Core


Ignore:
Timestamp:
05/20/2022 05:36:23 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update-core.php

    r53132 r53426  
    10131013    $wp_filesystem->delete( $versions_file );
    10141014
    1015     $php_version       = phpversion();
     1015    $php_version       = PHP_VERSION;
    10161016    $mysql_version     = $wpdb->db_version();
    10171017    $old_wp_version    = $GLOBALS['wp_version']; // The version of WordPress we're updating from.
Note: See TracChangeset for help on using the changeset viewer.