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; $i++)$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)
7.3.10.0110.04316.45
7.3.00.0030.03816.67
7.2.130.0070.03616.93
7.2.120.0070.04016.94
7.2.110.0070.03616.98
7.2.100.0100.03217.04
7.2.90.0090.03216.64
7.2.80.0070.04417.08
7.2.70.0030.03916.86
7.2.60.0030.03817.03
7.2.50.0070.03617.03
7.2.40.0070.03617.03
7.2.30.0030.04017.02
7.2.20.0130.03316.70
7.2.10.0030.03817.01
7.2.00.0050.03917.83
7.1.250.0070.06615.76
7.1.70.0000.05117.09
7.1.60.0130.06619.30
7.1.50.0130.06216.87
7.1.00.0070.11322.45
7.0.200.0100.03516.88
7.0.140.0000.13721.95
7.0.120.0030.10022.15
7.0.60.0030.09319.94
7.0.50.0000.07717.86
7.0.40.0070.11320.11
7.0.30.0200.06320.18
7.0.20.0370.10320.30
7.0.10.0100.11320.23
7.0.00.0070.11320.24
5.6.280.0030.18321.10
5.6.210.0070.08320.63
5.6.200.0100.14018.22
5.6.190.0100.08720.39
5.6.180.0200.13020.41
5.6.170.0330.13720.61
5.6.160.0100.15020.71
5.6.150.0100.08718.19
5.6.140.0070.14318.18
5.6.130.0030.11318.20
5.6.120.0070.11020.90
5.6.110.0070.14720.98
5.6.100.0100.13720.97
5.6.90.0100.07720.96
5.6.80.0100.14020.43
5.6.70.3430.08320.41
5.5.350.0230.13720.39
5.5.340.0070.13317.96
5.5.330.0070.08720.38
5.5.320.0230.12020.42
5.5.310.0100.10320.28
5.5.300.0100.11718.03
5.5.290.0070.14718.07
5.5.280.0070.08020.86
5.5.270.0030.11320.96
5.5.260.0000.14720.77
5.5.250.0100.14720.72
5.5.240.0230.13020.05
5.4.450.0030.14319.18
5.4.440.0000.11019.57
5.4.430.0100.12019.24
5.4.420.0070.14319.54
5.4.410.0100.08019.34
5.4.400.0070.08019.16
5.4.390.0100.12719.07
5.4.380.0070.12319.24
5.4.370.0000.10019.15
5.4.360.0100.14019.14
5.4.350.0070.09318.87
5.4.340.0070.14019.26
5.4.320.0100.13019.20
5.4.310.0130.08719.17
5.4.300.0100.14018.85
5.4.290.0030.14019.20
5.4.280.0030.08018.87
5.4.270.0000.08719.24
5.4.260.0030.08319.24
5.4.250.0070.08019.03
5.4.240.0070.07719.07
5.4.230.0070.07718.88
5.4.220.0200.07718.84
5.4.210.0070.07718.85
5.4.200.0030.08019.05
5.4.190.0000.08319.14
5.4.180.0030.08019.01
5.4.170.0030.08719.19
5.4.160.0030.08019.18
5.4.150.0100.07319.17
5.4.140.0000.08016.48
5.4.130.0030.08016.34
5.4.120.0130.10716.46
5.4.110.0070.12716.34
5.4.100.0100.10016.50
5.4.90.0100.12716.35
5.4.80.0030.08016.46
5.4.70.0030.13716.57
5.4.60.0030.09716.27
5.4.50.0030.14716.33
5.4.40.0130.12716.40
5.4.30.0070.12716.34
5.4.20.0100.12016.50
5.4.10.0070.12016.46
5.4.00.0100.11015.88
5.3.290.0070.11014.67
5.3.280.0070.09014.60
5.3.270.0000.09314.68
5.3.260.0000.09714.68
5.3.250.0000.10714.66
5.3.240.0030.08714.60
5.3.230.0030.16014.61
5.3.220.0000.16014.67
5.3.210.0070.14314.56
5.3.200.0030.09314.57
5.3.190.0130.16014.57
5.3.180.0100.14014.64
5.3.170.0030.10014.56
5.3.160.0130.13714.60
5.3.150.0030.15314.57
5.3.140.0000.15314.55
5.3.130.0070.09014.62
5.3.120.0130.14014.56
5.3.110.0100.14314.54
5.3.100.0030.15014.02
5.3.90.0070.10013.91
5.3.80.0100.10714.04
5.3.70.0100.14713.91
5.3.60.0070.09014.02
5.3.50.0130.14313.92
5.3.40.0000.11714.00
5.3.30.0070.10013.98
5.3.20.0000.10313.73
5.3.10.0030.09713.60
5.3.00.0070.09313.81
5.2.170.0070.15711.28
5.2.160.0030.15311.39
5.2.150.0000.10311.44
5.2.140.0030.12711.37
5.2.130.0000.13011.24
5.2.120.0100.10711.12
5.2.110.0030.15711.25
5.2.100.0170.14311.23
5.2.90.0070.15711.19
5.2.80.0070.10011.11
5.2.70.0070.09711.22
5.2.60.0100.15311.22
5.2.50.0070.16011.08
5.2.40.0070.15011.12
5.2.30.0000.10311.19
5.2.20.0100.14011.04
5.2.10.0030.11711.00
5.2.00.0000.16310.85
5.1.60.0030.15310.11
5.1.50.0070.15010.14
5.1.40.0000.11710.18
5.1.30.0030.14310.40
5.1.20.0000.15310.50
5.1.10.0000.10010.11
5.1.00.0030.14010.34
5.0.50.0000.2038.83
5.0.40.0030.2578.64
5.0.30.0000.2438.36
5.0.20.0000.2008.39
5.0.10.0000.1938.46
5.0.00.0000.2478.25
4.4.90.0030.2507.92
4.4.80.0030.2407.92
4.4.70.0000.2237.92
4.4.60.0000.1837.92
4.4.50.0000.2237.92
4.4.40.0000.2407.92
4.4.30.0030.2137.92
4.4.20.0030.1877.92
4.4.10.0030.1777.92
4.4.00.0030.1977.92
4.3.110.0000.2437.92
4.3.100.0030.2237.92
4.3.90.0000.2437.92
4.3.80.0030.2677.92
4.3.70.0030.2607.92
4.3.60.0000.1937.92
4.3.50.0000.2137.92
4.3.40.0000.1977.92
4.3.30.0030.2477.92
4.3.20.0000.2377.92
4.3.10.0000.2207.92
4.3.00.0000.2477.92

preferences:
35.55 ms | 401 KiB | 5 Q