Make WordPress Core


Ignore:
Timestamp:
05/20/2022 05:36:23 PM (2 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/class-plugin-installer-skin.php

    r50931 r53426  
    267267                /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */
    268268                __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ),
    269                 phpversion(),
     269                PHP_VERSION,
    270270                $requires_php
    271271            );
Note: See TracChangeset for help on using the changeset viewer.