com web/master: Support PHP 7.1 in the mirrors, as some mirrors already seems to be using an RC version, such as be2: manage/mirrors.php
| From: | Kalle Sommer Nielsen | Date: | Sat, 19 Nov 2016 15:16:48 +0000 |
| Subject: | com web/master: Support PHP 7.1 in the mirrors, as some mirrors already seems to be using an RC version, such as be2: manage/mirrors.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25339@lists.php.net to get a copy of this message | ||
Commit: f34c9ee4df1e5615a80f2a8a832f56bb77240bda
Author: Kalle Sommer Nielsen <kalle@php.net> Sat, 19 Nov 2016 16:16:48 +0100
Parents: 93633d680e80b13225c3e92c46141e6cf5c95c48
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=f34c9ee4df1e5615a80f2a8a832f56bb77240bda
Log:
Support PHP 7.1 in the mirrors, as some mirrors already seems to be using an RC version, such as be2
Changed paths:
M manage/mirrors.php
Diff:
diff --git a/manage/mirrors.php b/manage/mirrors.php
index 50cc7a3..f87c2c0 100644
--- a/manage/mirrors.php
+++ b/manage/mirrors.php
@@ -330,6 +330,7 @@ function page_mirror_list($moreinfo = false)
'55' => 0,
'56' => 0,
'70' => 0,
+ '71' => 0,
'other' => 0,
);
// Query the whole mirror list and display all mirrors. The query is
@@ -441,7 +442,7 @@ function page_mirror_list($moreinfo = false)
$summary .= '<td>' . $row['phpversion']. '</td>'
. "\n";
// Increment the appropriate version for our statistical overview
- if (preg_match('/^5\.3/',$row['phpversion'])) {
+ if (preg_match('/^5\.3/',$row['phpversion'])) {
$php_versions['53']++;
} elseif (preg_match('/^5.4/',$row['phpversion'])) {
$php_versions['54']++;
@@ -451,6 +452,8 @@ function page_mirror_list($moreinfo = false)
$php_versions['56']++;
} elseif (preg_match('/^7.0/',$row['phpversion'])) {
$php_versions['70']++;
+ } elseif (preg_match('/^7.1/',$row['phpversion'])) {
+ $php_versions['71']++;
} else {
$php_versions['other']++;
}
@@ -514,6 +517,7 @@ function page_mirror_list($moreinfo = false)
$php55_percent = sprintf('%.1f%%',($php_versions['55'] /
$stats['mirrors']) * 100);
$php56_percent = sprintf('%.1f%%',($php_versions['56'] /
$stats['mirrors']) * 100);
$php70_percent = sprintf('%.1f%%',($php_versions['70'] /
$stats['mirrors']) * 100);
+ $php71_percent = sprintf('%.1f%%',($php_versions['71'] /
$stats['mirrors']) * 100);
$php_other_versions = sprintf('%.1f%%',($php_versions['other'] /
$stats['mirrors']) * 100);
$stats['has_stats_percent'] = sprintf('%.1f%%',
$stats['has_stats'] / $stats['mirrors'] * 100);
@@ -584,6 +588,9 @@ $statusscreen = <<< EOS
<dt>PHP 7.0</dt>
<dd>{$php70_percent}</dd>
+ <dt>PHP 7.1</dt>
+ <dd>{$php71_percent}</dd>
+
<dt>Other</dt>
<dd>{$php_other_versions}</dd>
</dl>