[wp-trac] [WordPress Trac] #55680: Replace `phpversion()` function calls with PHP_VERSION
WordPress Trac
noreply at wordpress.org
Fri May 20 17:36:37 UTC 2022
#55680: Replace `phpversion()` function calls with PHP_VERSION
--------------------------------------+-----------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.1
Component: General | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"53426" 53426]:
{{{
#!CommitTicketReference repository="" revision="53426"
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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55680#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list