<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[53426] trunk: Code Modernization: Replace `phpversion()` function calls with `PHP_VERSION` constant.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/53426">53426</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/53426","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2022-05-20 17:36:23 +0000 (Fri, 20 May 2022)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>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 <a href="https://core.trac.wordpress.org/ticket/55680">#55680</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclassplugininstallerskinphp">trunk/src/wp-admin/includes/class-plugin-installer-skin.php</a></li>
<li><a href="#trunksrcwpadminincludesclasspluginupgraderphp">trunk/src/wp-admin/includes/class-plugin-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesclassthemeinstallerskinphp">trunk/src/wp-admin/includes/class-theme-installer-skin.php</a></li>
<li><a href="#trunksrcwpadminincludesclassthemeupgraderphp">trunk/src/wp-admin/includes/class-theme-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpautomaticupdaterphp">trunk/src/wp-admin/includes/class-wp-automatic-updater.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpdebugdataphp">trunk/src/wp-admin/includes/class-wp-debug-data.php</a></li>
<li><a href="#trunksrcwpadminincludesfilephp">trunk/src/wp-admin/includes/file.php</a></li>
<li><a href="#trunksrcwpadminincludesmiscphp">trunk/src/wp-admin/includes/misc.php</a></li>
<li><a href="#trunksrcwpadminincludespluginphp">trunk/src/wp-admin/includes/plugin.php</a></li>
<li><a href="#trunksrcwpadminincludesupdatecorephp">trunk/src/wp-admin/includes/update-core.php</a></li>
<li><a href="#trunksrcwpadmininstallphp">trunk/src/wp-admin/install.php</a></li>
<li><a href="#trunksrcwpadminupdatecorephp">trunk/src/wp-admin/update-core.php</a></li>
<li><a href="#trunksrcwpadminupgradephp">trunk/src/wp-admin/upgrade.php</a></li>
<li><a href="#trunksrcwpcronphp">trunk/src/wp-cron.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludesloadphp">trunk/src/wp-includes/load.php</a></li>
<li><a href="#trunksrcwpincludesupdatephp">trunk/src/wp-includes/update.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionsisPhpVersionCompatiblephp">trunk/tests/phpunit/tests/functions/isPhpVersionCompatible.php</a></li>
<li><a href="#trunktestsphpunittestsloadwpIsIniValueChangeablephp">trunk/tests/phpunit/tests/load/wpIsIniValueChangeable.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclassplugininstallerskinphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-plugin-installer-skin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-plugin-installer-skin.php       2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/class-plugin-installer-skin.php 2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -266,7 +266,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $error = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */
</span><span class="cx" style="display: block; padding: 0 10px">                                __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $requires_php
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasspluginupgraderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-plugin-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-plugin-upgrader.php     2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/class-plugin-upgrader.php       2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -447,7 +447,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $error = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */
</span><span class="cx" style="display: block; padding: 0 10px">                                __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $requires_php
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminincludesclassthemeinstallerskinphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-theme-installer-skin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-theme-installer-skin.php        2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/class-theme-installer-skin.php  2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -301,7 +301,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $error = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */
</span><span class="cx" style="display: block; padding: 0 10px">                                __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $requires_php
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminincludesclassthemeupgraderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-theme-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-theme-upgrader.php      2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/class-theme-upgrader.php        2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -599,7 +599,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $error = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */
</span><span class="cx" style="display: block; padding: 0 10px">                                __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $requires_php
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpautomaticupdaterphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-automatic-updater.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-automatic-updater.php        2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/class-wp-automatic-updater.php  2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -222,7 +222,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 'core' === $type ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $php_compat = version_compare( phpversion(), $item->php_version, '>=' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $php_compat = version_compare( PHP_VERSION, $item->php_version, '>=' );
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                $mysql_compat = true;
</span><span class="cx" style="display: block; padding: 0 10px">                        } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -236,7 +236,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // If updating a plugin or theme, ensure the minimum PHP version requirements are satisfied.
</span><span class="cx" style="display: block; padding: 0 10px">                if ( in_array( $type, array( 'plugin', 'theme' ), true ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 if ( ! empty( $item->requires_php ) && version_compare( PHP_VERSION, $item->requires_php, '<' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 return false;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpdebugdataphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-debug-data.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-debug-data.php       2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/class-wp-debug-data.php 2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -677,23 +677,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $server_architecture = 'unknown';
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( function_exists( 'phpversion' ) ) {
-                       $php_version_debug = phpversion();
-                       // Whether PHP supports 64-bit.
-                       $php64bit = ( PHP_INT_SIZE * 8 === 64 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $php_version_debug = PHP_VERSION;
+               // Whether PHP supports 64-bit.
+               $php64bit = ( PHP_INT_SIZE * 8 === 64 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $php_version = sprintf(
-                               '%s %s',
-                               $php_version_debug,
-                               ( $php64bit ? __( '(Supports 64bit values)' ) : __( '(Does not support 64bit values)' ) )
-                       );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $php_version = sprintf(
+                       '%s %s',
+                       $php_version_debug,
+                       ( $php64bit ? __( '(Supports 64bit values)' ) : __( '(Does not support 64bit values)' ) )
+               );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( $php64bit ) {
-                               $php_version_debug .= ' 64bit';
-                       }
-               } else {
-                       $php_version       = __( 'Unable to determine PHP version' );
-                       $php_version_debug = 'unknown';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( $php64bit ) {
+                       $php_version_debug .= ' 64bit';
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( function_exists( 'php_sapi_name' ) ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesfilephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/file.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/file.php      2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/file.php        2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1385,7 +1385,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                '<span class="code">' . esc_html( $filename_for_errors ) . '</span>'
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'php'    => phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'php'    => PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1420,7 +1420,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        '<span class="code">' . esc_html( $filename_for_errors ) . '</span>'
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'php'                => phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'php'                => PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'sodium'             => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        'polyfill_is_fast'   => false,
</span><span class="cx" style="display: block; padding: 0 10px">                                        'max_execution_time' => ini_get( 'max_execution_time' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1493,7 +1493,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'hash'        => bin2hex( $file_hash ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'skipped_key' => $skipped_key,
</span><span class="cx" style="display: block; padding: 0 10px">                        'skipped_sig' => $skipped_signature,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'php'         => phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'php'         => PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                         'sodium'      => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
</span><span class="cx" style="display: block; padding: 0 10px">                )
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span></span></pre></div>
<a id="trunksrcwpadminincludesmiscphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/misc.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/misc.php      2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/misc.php        2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1524,7 +1524,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @return array|false Array of PHP version data. False on failure.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_check_php_version() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $version = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $version = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px">         $key     = md5( $version );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $response = get_site_transient( 'php_check_' . $key );
</span></span></pre></div>
<a id="trunksrcwpadminincludespluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/plugin.php    2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/plugin.php      2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1150,7 +1150,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: 1: Current WordPress version, 2: Current PHP version, 3: Plugin name, 4: Required WordPress version, 5: Required PHP version. */
</span><span class="cx" style="display: block; padding: 0 10px">                                _x( '<strong>Error:</strong> Current versions of WordPress (%1$s) and PHP (%2$s) do not meet minimum requirements for %3$s. The plugin requires WordPress %4$s and PHP %5$s.', 'plugin' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                get_bloginfo( 'version' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $plugin_headers['Name'],
</span><span class="cx" style="display: block; padding: 0 10px">                                $requirements['requires'],
</span><span class="cx" style="display: block; padding: 0 10px">                                $requirements['requires_php']
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1162,7 +1162,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        '<p>' . sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: 1: Current PHP version, 2: Plugin name, 3: Required PHP version. */
</span><span class="cx" style="display: block; padding: 0 10px">                                _x( '<strong>Error:</strong> Current PHP version (%1$s) does not meet minimum requirements for %2$s. The plugin requires PHP %3$s.', 'plugin' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                phpversion(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         PHP_VERSION,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $plugin_headers['Name'],
</span><span class="cx" style="display: block; padding: 0 10px">                                $requirements['requires_php']
</span><span class="cx" style="display: block; padding: 0 10px">                        ) . $php_update_message . '</p>'
</span></span></pre></div>
<a id="trunksrcwpadminincludesupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/update-core.php       2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/includes/update-core.php 2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1012,7 +1012,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        require WP_CONTENT_DIR . '/upgrade/version-current.php';
</span><span class="cx" style="display: block; padding: 0 10px">        $wp_filesystem->delete( $versions_file );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $php_version       = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $php_version       = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px">         $mysql_version     = $wpdb->db_version();
</span><span class="cx" style="display: block; padding: 0 10px">        $old_wp_version    = $GLOBALS['wp_version']; // The version of WordPress we're updating from.
</span><span class="cx" style="display: block; padding: 0 10px">        $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release.
</span></span></pre></div>
<a id="trunksrcwpadmininstallphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/install.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/install.php    2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/install.php      2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -228,7 +228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_version, $required_php_version, $required_mysql_version;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$php_version   = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$php_version   = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px"> $mysql_version = $wpdb->db_version();
</span><span class="cx" style="display: block; padding: 0 10px"> $php_compat    = version_compare( $php_version, $required_php_version, '>=' );
</span><span class="cx" style="display: block; padding: 0 10px"> $mysql_compat  = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
</span></span></pre></div>
<a id="trunksrcwpadminupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/update-core.php        2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/update-core.php  2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -59,7 +59,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $message       = '';
</span><span class="cx" style="display: block; padding: 0 10px">        $form_action   = 'update-core.php?action=do-core-upgrade';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $php_version   = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $php_version   = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px">         $mysql_version = $wpdb->db_version();
</span><span class="cx" style="display: block; padding: 0 10px">        $show_buttons  = true;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminupgradephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/upgrade.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/upgrade.php    2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-admin/upgrade.php      2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +44,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> $step = (int) $step;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$php_version   = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$php_version   = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px"> $mysql_version = $wpdb->db_version();
</span><span class="cx" style="display: block; padding: 0 10px"> $php_compat    = version_compare( $php_version, $required_php_version, '>=' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
</span></span></pre></div>
<a id="trunksrcwpcronphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-cron.php     2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-cron.php       2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -19,7 +19,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ignore_user_abort( true );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /* Don't make the request block till we finish, if possible. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(), '7.0.16', '>=' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( PHP_VERSION_ID >= 70016 && function_exists( 'fastcgi_finish_request' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">         if ( ! headers_sent() ) {
</span><span class="cx" style="display: block; padding: 0 10px">                header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
</span><span class="cx" style="display: block; padding: 0 10px">                header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
</span></span></pre></div>
<a id="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php       2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-includes/functions.php 2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8422,7 +8422,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @return bool True if required version is compatible or empty, false if not.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function is_php_version_compatible( $required ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        return empty( $required ) || version_compare( phpversion(), $required, '>=' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return empty( $required ) || version_compare( PHP_VERSION, $required, '>=' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesloadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/load.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/load.php    2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-includes/load.php      2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,7 +143,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_check_php_mysql_versions() {
</span><span class="cx" style="display: block; padding: 0 10px">        global $required_php_version, $wp_version;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $php_version = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $php_version = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        if ( version_compare( $required_php_version, $php_version, '>' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $protocol = wp_get_server_protocol();
</span></span></pre></div>
<a id="trunksrcwpincludesupdatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/update.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/update.php  2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/src/wp-includes/update.php    2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,7 +32,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Include an unmodified $wp_version.
</span><span class="cx" style="display: block; padding: 0 10px">        require ABSPATH . WPINC . '/version.php';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $php_version = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $php_version = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $current      = get_site_transient( 'update_core' );
</span><span class="cx" style="display: block; padding: 0 10px">        $translations = wp_get_installed_translations( 'core' );
</span></span></pre></div>
<a id="trunktestsphpunittestsfunctionsisPhpVersionCompatiblephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/functions/isPhpVersionCompatible.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/functions/isPhpVersionCompatible.php    2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/tests/phpunit/tests/functions/isPhpVersionCompatible.php      2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +27,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function data_is_php_version_compatible() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $php_version = phpversion();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $php_version = PHP_VERSION;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $version_parts  = explode( '.', $php_version );
</span><span class="cx" style="display: block; padding: 0 10px">                $lower_version  = $version_parts;
</span></span></pre></div>
<a id="trunktestsphpunittestsloadwpIsIniValueChangeablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/load/wpIsIniValueChangeable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/load/wpIsIniValueChangeable.php 2022-05-20 16:47:34 UTC (rev 53425)
+++ trunk/tests/phpunit/tests/load/wpIsIniValueChangeable.php   2022-05-20 17:36:23 UTC (rev 53426)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,7 +40,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array( 'upload_tmp_dir', false ), // PHP_INI_SYSTEM.
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( extension_loaded( 'Tidy' ) && version_compare( PHP_VERSION, '7.0.0', '>' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( PHP_VERSION_ID > 70000 && extension_loaded( 'Tidy' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $array[] = array( 'tidy.clean_output', true ); // PHP_INI_USER.
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>