3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain'); //print_r($_SERVER); function on_shutdown(){ echo "<!--\n"; echo "\n\tTime Taken:"; echo "\n\t\t".number_format(microtime(true) - PM_INIT_TIME, 8)."s"; echo "\n\tHeaders Sent:"; $file = $line = null; headers_sent($file, $line); echo "\n\t\t$file: $line"; echo "\n\tLast Error:"; if(function_exists('error_get_last') && error_get_last()) foreach(error_get_last() as $k=>$v) echo "\n\t\t$k: $v"; elseif($php_errormsg) echo "\n\t\tError: $php_errormsg"; else echo "\n\t\tnone"; echo "\n\tIncluded Files:"; echo "\n\t\t".implode("\n\t\t", get_included_files()); echo "\n-->"; } define('PM_INIT_TIME', microtime(true)); register_shutdown_function('on_shutdown'); while(ob_get_level())ob_end_flush(); ob_implicit_flush(true); $a = 100; $b = 3; for($i=0; $i<999999)$c = $a / $b; /*$dir = $_SERVER['SCRIPT_FILENAME']; while($dir = rtrim(dirname($dir), '/')){ echo $dir.PHP_EOL; foreach(glob($dir.'/*') as $file)echo chr(9).$file.PHP_EOL; }*/ ?>

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)
5.4.130.0030.04716.33
5.4.120.0030.07316.30
5.4.110.0070.06716.39
5.4.100.0070.07316.39
5.4.90.0000.08316.41
5.4.80.0100.07016.52
5.4.70.0070.05016.43
5.4.60.0030.08316.25
5.4.50.0030.05016.27
5.4.40.0070.06016.38
5.4.30.0100.05716.25
5.4.20.0070.07016.23
5.4.10.0100.03316.44
5.4.00.0070.04315.84
5.3.230.0100.03314.60
5.3.220.0070.05014.71
5.3.210.0130.07314.59
5.3.200.0070.07014.64
5.3.190.0170.06314.71
5.3.180.0100.06014.60
5.3.170.0070.07014.60
5.3.160.0100.06014.71
5.3.150.0070.07714.61
5.3.140.0130.07014.71
5.3.130.0030.05314.59
5.3.120.0030.05014.63
5.3.110.0030.04014.47
5.3.100.0070.05314.09
5.3.90.0030.03714.17
5.3.80.0070.07713.97
5.3.70.0070.05014.17
5.3.60.0100.04014.08
5.3.50.0070.04313.95
5.3.40.0100.05714.11
5.3.30.0100.03313.98
5.3.20.0100.07013.74
5.3.10.0130.05713.66
5.3.00.0030.03713.66

preferences:
143.35 ms | 1394 KiB | 7 Q