3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Piwik - Open source web analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ /** * This file is executed before anything else. * It checks the minimum PHP version required to run Piwik. * This file must be compatible PHP4. */ $piwik_errorMessage = ''; // Minimum requirement: stream_resolve_include_path in 5.3.2, namespaces in 5.3 $piwik_minimumPHPVersion = '5.3.2'; $piwik_currentPHPVersion = PHP_VERSION; $minimumPhpInvalid = version_compare($piwik_minimumPHPVersion, $piwik_currentPHPVersion) > 0; if ($minimumPhpInvalid) { $piwik_errorMessage .= "<p><strong>To run Piwik you need at least PHP version $piwik_minimumPHPVersion</strong></p> <p>Unfortunately it seems your webserver is using PHP version $piwik_currentPHPVersion. </p> <p>Please try to update your PHP version, Piwik is really worth it! Nowadays most web hosts support PHP $piwik_minimumPHPVersion.</p> <p>Also see the FAQ: <a href='http://piwik.org/faq/how-to-install/#faq_77'>My Web host supports PHP4 by default. How can I enable PHP5?</a></p>"; } else { if (!class_exists('ArrayObject')) { $piwik_errorMessage .= "<p><strong>Piwik and Zend Framework require the SPL extension</strong></p> <p>It appears your PHP was compiled with <pre>--disable-spl</pre>. To enjoy Piwik, you need PHP compiled without that configure option.</p>"; } if (!extension_loaded('session')) { $piwik_errorMessage .= "<p><strong>Piwik and Zend_Session require the session extension</strong></p> <p>It appears your PHP was compiled with <pre>--disable-session</pre>. To enjoy Piwik, you need PHP compiled without that configure option.</p>"; } if (!function_exists('ini_set')) { $piwik_errorMessage .= "<p><strong>Piwik and Zend_Session require the <code>ini_set()</code> function</strong></p> <p>It appears your PHP has disabled this function. To enjoy Piwik, you need remove <pre>ini_set</pre> from your <pre>disable_functions</pre> directive in php.ini, and restart your webserver.</p>"; } if (!file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') && !file_exists(PIWIK_INCLUDE_PATH . '/../../autoload.php')) { $composerInstall = "In the piwik directory, run in the command line the following (eg. via ssh): \n\n" . "<pre> curl -sS https://getcomposer.org/installer | php \n\n php composer.phar install\n\n</pre> "; if (DIRECTORY_SEPARATOR === '\\' /* ::isWindows() */) { $composerInstall = "Download and run <a href=\"https://getcomposer.org/Composer-Setup.exe\"><b>Composer-Setup.exe</b></a>, it will install the latest Composer version and set up your PATH so that you can just call composer from any directory in your command line. " . " <br>Then run this command in a terminal in the piwik directory: <br> $ php composer.phar update "; } $piwik_errorMessage .= "<p>It appears the <a href='https://getcomposer.org/' target='_blank'>composer</a> tool is not yet installed. You can install Composer in a few easy steps:\n\n". "<br/>" . $composerInstall. " This will initialize composer for Piwik and download libraries we use in vendor/* directory.". "\n\n<br/><br/>Then reload this page to access your analytics reports." . "\n\n<br/><br/>Note: if for some reasons you cannot install composer, instead install the latest Piwik release from ". "<a href='http://builds.piwik.org/latest.zip'>builds.piwik.org</a>.</p>"; } } if (!function_exists('Piwik_ExitWithMessage')) { /** * Returns true if Piwik should print the backtrace with error messages. * * To make sure the backtrace is printed, define PIWIK_PRINT_ERROR_BACKTRACE. * * @return bool */ function Piwik_ShouldPrintBackTraceWithMessage() { $bool = (defined('PIWIK_PRINT_ERROR_BACKTRACE') && PIWIK_PRINT_ERROR_BACKTRACE) || (defined('PIWIK_TRACKER_DEBUG') && PIWIK_TRACKER_DEBUG); return $bool; } /** * Displays info/warning/error message in a friendly UI and exits. * * @param string $message Main message, must be html encoded before calling * @param bool|string $optionalTrace Backtrace; will be displayed in lighter color * @param bool $optionalLinks If true, will show links to the Piwik website for help * @param bool $optionalLinkBack If true, displays a link to go back */ function Piwik_ExitWithMessage($message, $optionalTrace = false, $optionalLinks = false, $optionalLinkBack = false) { @header('Content-Type: text/html; charset=utf-8'); if ($optionalTrace) { $optionalTrace = '<span class="exception-backtrace">Backtrace:<br /><pre>' . $optionalTrace . '</pre></span>'; } $isCli = PHP_SAPI == 'cli'; if ($optionalLinks) { $optionalLinks = '<ul> <li><a target="_blank" href="http://piwik.org">Piwik.org homepage</a></li> <li><a target="_blank" href="http://piwik.org/faq/">Piwik Frequently Asked Questions</a></li> <li><a target="_blank" href="http://piwik.org/docs/">Piwik Documentation</a></li> <li><a target="_blank" href="http://forum.piwik.org/">Piwik Forums</a></li> <li><a target="_blank" href="http://demo.piwik.org">Piwik Online Demo</a></li> </ul>'; } if ($optionalLinkBack) { $optionalLinkBack = '<a href="javascript:window.back();">Go Back</a><br/>'; } $headerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/templates/simpleLayoutHeader.tpl'); $footerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/templates/simpleLayoutFooter.tpl'); $headerPage = str_replace('{$HTML_TITLE}', 'Piwik &rsaquo; Error', $headerPage); $content = '<p>' . $message . '</p> <p>' . $optionalLinkBack . '<a href="index.php">Go to Piwik</a><br/> <a href="index.php?module=Login">Login</a>' . '</p>' . ' ' . (Piwik_ShouldPrintBackTraceWithMessage() ? $optionalTrace : '') . ' ' . $optionalLinks; if($isCli) { $message = str_replace(array("<br />", "<br>", "<br/>", "</p>"), "\n", $message); $message = str_replace("\t", "", $message); echo strip_tags($message); } else { echo $headerPage . $content . $footerPage; } echo "\n"; exit; } } if (!empty($piwik_errorMessage)) { Piwik_ExitWithMessage($piwik_errorMessage, false, true); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.40.0150.00419.00
8.3.30.0100.00320.33
8.3.20.0040.00420.16
8.3.10.0080.00022.04
8.3.00.0050.00322.22
8.2.170.0110.00422.96
8.2.160.0100.00320.57
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00320.69
8.2.110.0000.00922.14
8.2.100.0080.00417.78
8.2.90.0090.00019.28
8.2.80.0000.00819.25
8.2.70.0040.00417.63
8.2.60.0050.00317.93
8.2.50.0080.00418.07
8.2.40.0030.00618.22
8.2.30.0030.00618.03
8.2.20.0030.00517.76
8.2.10.0040.00417.75
8.2.00.0050.00317.73
8.1.270.0050.00322.32
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.01222.25
8.1.230.0110.00021.09
8.1.220.0000.00917.91
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0050.00317.66
8.1.180.0030.00519.01
8.1.170.0080.00018.74
8.1.160.0040.00422.20
8.1.150.0080.00418.66
8.1.140.0000.00717.54
8.1.130.0030.00317.89
8.1.120.0040.00417.44
8.1.110.0000.00717.44
8.1.100.0040.00417.52
8.1.90.0000.00717.40
8.1.80.0040.00417.57
8.1.70.0030.00517.40
8.1.60.0060.00317.63
8.1.50.0000.00717.57
8.1.40.0000.00817.57
8.1.30.0040.00417.64
8.1.20.0080.00017.69
8.1.10.0000.00817.54
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0000.00817.30
8.0.280.0070.00018.42
8.0.270.0000.00716.94
8.0.260.0000.00718.55
8.0.250.0000.00717.13
8.0.240.0060.00317.09
8.0.230.0000.00717.07
8.0.220.0050.00217.06
8.0.210.0030.00316.88
8.0.200.0000.00817.04
8.0.190.0060.00316.95
8.0.180.0000.00717.08
8.0.170.0050.00317.07
8.0.160.0070.00016.98
8.0.150.0050.00317.00
8.0.140.0000.00716.86
8.0.130.0040.00413.48
8.0.120.0000.00816.82
8.0.110.0000.00816.96
8.0.100.0000.00816.98
8.0.90.0050.00216.99
8.0.80.0120.00316.99
8.0.70.0040.00416.82
8.0.60.0000.00716.97
8.0.50.0030.00516.89
8.0.30.0060.01617.22
8.0.20.0100.01217.40
8.0.10.0040.00416.96
8.0.00.0090.00916.82
7.4.330.0050.00015.00
7.4.320.0030.00316.67
7.4.300.0040.00416.68
7.4.290.0030.00316.58
7.4.280.0030.00316.58
7.4.270.0000.00816.75
7.4.260.0040.00416.45
7.4.250.0040.00416.63
7.4.240.0040.00316.53
7.4.230.0000.00816.54
7.4.220.0180.00016.71
7.4.210.0090.00816.65
7.4.200.0000.00716.59
7.4.190.0000.00816.56
7.4.160.0040.01416.65
7.4.150.0090.01017.40
7.4.140.0090.01317.86
7.4.130.0120.00916.58
7.4.120.0090.00916.71
7.4.110.0130.00516.56
7.4.100.0130.00916.54
7.4.90.0140.00716.64
7.4.80.0090.00919.39
7.4.70.0070.01416.54
7.4.60.0070.01016.58
7.4.50.0060.00316.33
7.4.40.0060.00922.77
7.4.30.0120.00616.67
7.4.00.0060.01315.24
7.3.330.0050.00013.35
7.3.320.0040.00413.50
7.3.310.0000.00816.57
7.3.300.0040.00416.39
7.3.290.0110.00416.50
7.3.280.0090.00916.52
7.3.270.0100.00717.40
7.3.260.0140.00616.50
7.3.250.0120.00616.59
7.3.240.0130.01016.66
7.3.230.0090.00916.50
7.3.210.0110.00716.37
7.3.200.0160.00319.39
7.3.190.0100.01316.67
7.3.180.0100.01216.68
7.3.170.0090.00916.49
7.3.160.0000.01716.60
7.3.120.0040.01315.01
7.3.110.0090.00914.75
7.3.100.0060.00915.03
7.3.90.0060.00615.03
7.3.80.0050.00714.92
7.3.70.0010.00814.83
7.3.60.0100.00414.86
7.3.50.0030.00814.83
7.3.40.0030.01214.94
7.3.30.0060.00914.71
7.3.20.0050.00916.79
7.3.10.0050.00616.63
7.3.00.0060.00616.80
7.2.330.0070.01616.65
7.2.320.0120.00716.82
7.2.310.0100.01616.81
7.2.300.0140.00416.61
7.2.290.0130.00316.87
7.2.250.0030.01615.05
7.2.240.0080.01214.86
7.2.230.0070.00715.36
7.2.220.0070.00515.31
7.2.210.0060.00914.97
7.2.200.0040.00615.20
7.2.190.0050.01115.15
7.2.180.0050.00815.25
7.2.170.0080.01014.91
7.2.60.0130.00316.68
7.2.00.0120.00319.08
7.1.330.0080.00815.79
7.1.320.0060.00816.04
7.1.310.0080.00515.87
7.1.300.0050.01115.90
7.1.290.0000.01215.92
7.1.280.0100.00515.89
7.1.270.0020.01415.74
7.1.260.0070.00715.85
7.1.200.0090.00615.83
7.1.100.0060.00617.80
7.1.70.0030.00616.94
7.1.60.0100.01619.43
7.1.50.0100.01016.63
7.1.00.0070.03022.45
7.0.200.0300.00314.71
7.0.140.0030.07321.95
7.0.80.0600.03319.99
7.0.70.0530.07719.94
7.0.60.0470.04720.00
7.0.50.0670.08720.34
7.0.40.0000.08720.14
7.0.30.0130.07720.05
7.0.20.0200.07320.08
7.0.10.0130.07320.10
7.0.00.0130.08020.12
5.6.280.0030.07320.84
5.6.230.0030.08020.69
5.6.220.0100.07020.56
5.6.210.0100.07720.71
5.6.200.0200.07321.14
5.6.190.0070.08721.03
5.6.180.0170.08021.13
5.6.170.0130.08021.14
5.6.160.0100.08021.06
5.6.150.0170.06721.05
5.6.140.0070.04721.16
5.6.130.0170.04020.98
5.6.120.0070.08720.98
5.6.110.0100.07321.04
5.6.100.0070.08321.04
5.6.90.0070.08020.99
5.6.80.0100.04320.46
5.6.70.0070.04320.49
5.6.60.0130.06020.57
5.6.50.0130.07320.59
5.6.40.0100.07720.46
5.6.30.0100.08020.47
5.6.20.0070.08020.46
5.6.10.0130.04720.47
5.6.00.0100.04720.25
5.5.370.0070.05320.38
5.5.360.0130.07320.41
5.5.350.0030.05320.42
5.5.340.0070.04020.80
5.5.330.0070.08320.92
5.5.320.0070.07720.95
5.5.310.0070.05720.92
5.5.300.0100.03720.83
5.5.290.0000.08720.85
5.5.280.0100.08320.89
5.5.270.0100.07720.88
5.5.260.0070.06020.89
5.5.250.0100.05320.70
5.5.240.0070.06020.24
5.5.230.0100.04020.28
5.5.220.0130.07020.14
5.5.210.0030.05320.24
5.5.200.0130.03720.18
5.5.190.0100.08020.24
5.5.180.0070.08020.25
5.5.160.0130.06720.14
5.5.150.0070.06320.27
5.5.140.0070.08020.17
5.5.130.0100.06020.30
5.5.120.0030.08720.11
5.5.110.0130.07320.26
5.5.100.0070.04719.98
5.5.90.0170.07020.15
5.5.80.0130.05020.13
5.5.70.0170.06320.09
5.5.60.0130.07319.96
5.5.50.0070.07720.18
5.5.40.0070.07720.08
5.5.30.0130.08320.02
5.5.20.0000.07320.14
5.5.10.0070.07020.07
5.5.00.0070.08020.16
5.4.450.0100.08319.28
5.4.440.0130.06319.28
5.4.430.0070.07719.35
5.4.420.0130.03319.17
5.4.410.0030.08319.43
5.4.400.0030.08319.18
5.4.390.0100.08019.08
5.4.380.0070.07719.03
5.4.370.0070.06719.05
5.4.360.0130.03719.16
5.4.350.0100.05319.20
5.4.340.0100.07019.23
5.4.320.0130.07019.09
5.4.310.0100.04319.23
5.4.300.0100.07319.14
5.4.290.0070.05019.23
5.4.280.0130.07719.13
5.4.270.0100.07019.09
5.4.260.0100.07319.09
5.4.250.0000.08719.22
5.4.240.0100.07318.84
5.4.230.0170.06719.07
5.4.220.0000.05719.02
5.4.210.0130.04019.20
5.4.200.0070.07019.17
5.4.190.0030.07719.02
5.4.180.0170.08019.17
5.4.170.0070.06719.12
5.4.160.0130.06719.03
5.4.150.0100.07318.88
5.4.140.0070.06316.48
5.4.130.0030.06316.40
5.4.120.0100.07016.37
5.4.110.0100.04016.46
5.4.100.0030.04316.37
5.4.90.0030.03716.50
5.4.80.0070.07316.34
5.4.70.0030.05316.50
5.4.60.0170.04016.46
5.4.50.0230.05716.40
5.4.40.0100.06716.43
5.4.30.0100.04016.27
5.4.20.0000.06716.34
5.4.10.0030.07716.36
5.4.00.0000.07315.83
5.3.290.0030.07714.68
5.3.280.0030.08014.63
5.3.270.0030.08314.65
5.3.260.0100.06014.64
5.3.250.0230.05314.59
5.3.240.0070.07014.64
5.3.230.0100.06714.60
5.3.220.0070.04714.66
5.3.210.0070.05014.52
5.3.200.0030.04314.53
5.3.190.0070.07714.66
5.3.180.0030.05014.53
5.3.170.0130.03714.66
5.3.160.0130.05714.73
5.3.150.0100.07314.53
5.3.140.0070.07714.71
5.3.130.0030.07314.57
5.3.120.0030.08314.64
5.3.110.0100.07714.63
5.3.100.0030.08714.07
5.3.90.0030.07714.14
5.3.80.0170.05014.06
5.3.70.0000.07314.03
5.3.60.0070.03714.01
5.3.50.0070.05014.07
5.3.40.0100.04714.03
5.3.30.0100.03713.87
5.3.20.0000.07313.79
5.3.10.0030.05013.59
5.3.00.0000.05013.59
5.2.170.0100.06013.51
5.2.160.0030.05013.51
5.2.150.0030.06013.51
5.2.140.0030.04313.51
5.2.130.0070.05013.51
5.2.120.0070.06013.51
5.2.110.0030.03013.51
5.2.100.0100.05013.51
5.2.90.0030.03313.51
5.2.80.0070.05713.51
5.2.70.0000.06013.51
5.2.60.0030.06313.51
5.2.50.0030.03313.51
5.2.40.0030.03013.51
5.2.30.0000.04713.51
5.2.20.0030.04313.51
5.2.10.0100.03013.51
5.2.00.0000.03313.51
5.1.60.0070.02013.51
5.1.50.0030.02313.51
5.1.40.0000.04713.51
5.1.30.0000.04013.51
5.1.20.0030.02313.51
5.1.10.0030.02713.51
5.1.00.0000.02713.51
5.0.50.0030.01713.51
5.0.40.0000.02013.51
5.0.30.0030.02713.51
5.0.20.0030.01713.52
5.0.10.0000.02013.52
5.0.00.0030.03013.52
4.4.90.0000.03713.51
4.4.80.0000.03013.51
4.4.70.0000.02013.51
4.4.60.0030.02313.51
4.4.50.0000.02713.51
4.4.40.0000.02713.51
4.4.30.0000.01713.51
4.4.20.0000.01713.51
4.4.10.0030.01313.51
4.4.00.0000.02313.51
4.3.110.0000.01313.51
4.3.100.0030.01313.52
4.3.90.0000.01713.52
4.3.80.0000.02313.52
4.3.70.0000.01713.52
4.3.60.0000.01713.52
4.3.50.0070.01013.52
4.3.40.0030.02313.52
4.3.30.0000.01713.52
4.3.20.0000.01713.52
4.3.10.0000.01313.52
4.3.00.0030.01313.52

preferences:
47.22 ms | 400 KiB | 5 Q