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:
@@ -19,7 +19,7 @@
|
||||
ignore_user_abort( true );
|
||||
|
||||
/* Don't make the request block till we finish, if possible. */
|
||||
if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(), '7.0.16', '>=' ) ) {
|
||||
if ( PHP_VERSION_ID >= 70016 && function_exists( 'fastcgi_finish_request' ) ) {
|
||||
if ( ! headers_sent() ) {
|
||||
header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
|
||||
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
|
||||
|
||||
Reference in New Issue
Block a user