3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $throw; $throw = false; function foo() { bar(); } function bar() { baz(); } function baz() { boom(); } function boom() { global $throw; if ($throw) { throw new RuntimeException(); } } function test($n) { for ($i = 0; $i < $n; $i++) { try { foo(); } catch (RuntimeException $e) { echo $e->getLine(); } } } $t = microtime(); test(1000000); echo (microtime() - $t) . ' us';

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.2.00.0000.10219.35
7.1.70.0030.10917.31
7.1.60.0130.14219.29
7.1.50.0070.15016.63
7.1.00.0070.20022.30
7.0.200.0030.10216.84
7.0.140.0100.21022.17
7.0.70.0000.13021.70
7.0.60.0070.20721.58
7.0.50.0170.16322.13
7.0.40.0030.21019.95
7.0.30.0030.18020.13
7.0.20.0000.20720.10
7.0.10.0030.19320.07
7.0.00.0100.17320.08
5.6.280.0070.32321.09
5.6.220.0000.27320.71
5.6.210.0030.33720.49
5.6.200.0030.34021.04
5.6.190.0070.34321.10
5.6.180.0130.35320.95
5.6.170.0100.32721.08
5.6.160.0030.31321.10
5.6.150.0070.33721.18
5.6.140.0000.26321.17
5.6.130.0070.34721.07
5.6.120.0030.33321.05
5.6.110.0030.31021.04
5.6.100.0030.32320.95
5.6.90.0130.32721.08
5.6.80.0030.27320.56
5.6.70.0100.30720.43
5.6.60.0000.31720.49
5.6.50.0030.32020.47
5.6.40.0030.30720.41
5.6.30.0130.30320.54
5.6.20.0000.33320.39
5.6.10.0000.33020.34
5.6.00.0030.33020.35
5.5.360.0070.31720.43
5.5.350.0070.30020.41
5.5.340.0000.29720.77
5.5.330.0030.30320.91
5.5.320.0230.33020.83
5.5.310.0000.30020.82
5.5.300.0100.31720.81
5.5.290.0030.32020.87
5.5.280.0030.32320.86
5.5.270.0000.34020.84
5.5.260.0030.33720.84
5.5.250.0030.32020.72
5.5.240.0000.25720.31
5.5.230.0070.30020.23
5.5.220.0000.30720.31
5.5.210.0070.29320.29
5.5.200.0000.32720.28
5.5.190.0100.26720.20
5.5.180.0030.29720.17
5.5.160.0000.30720.22
5.5.150.0030.30020.11
5.5.140.0030.31320.11
5.5.130.0030.30720.17
5.5.120.0070.29720.08
5.5.110.0100.32720.25
5.5.100.0030.29020.20
5.5.90.0170.24320.05
5.5.80.0070.31319.98
5.5.70.0070.28720.07
5.5.60.0030.33720.05
5.5.50.0100.34020.08
5.5.40.0070.29320.15
5.5.30.0000.29320.04
5.5.20.0030.30720.05
5.5.10.0030.31720.05
5.5.00.0030.30020.13
5.4.450.0000.31319.51
5.4.440.0030.25319.33
5.4.430.0070.30019.46
5.4.420.0070.25319.36
5.4.410.0030.28719.42
5.4.400.0130.32318.88
5.4.390.0170.24019.10
5.4.380.0030.32319.13
5.4.370.0070.28719.16
5.4.360.0000.34019.14
5.4.350.0000.33019.16
5.4.340.0070.25019.23
5.4.320.0000.31018.85
5.4.310.0030.33319.13
5.4.300.0030.30019.13
5.4.290.0070.34319.14
5.4.280.0030.34319.04
5.4.270.0030.31018.84
5.4.260.0000.34719.18
5.4.250.0100.30719.13
5.4.240.0070.32318.95
5.4.230.0100.32319.04
5.4.220.0000.32019.04
5.4.210.0070.34019.11
5.4.200.0000.33719.20
5.4.190.0070.32719.14
5.4.180.0000.31318.86
5.4.170.0000.25719.08
5.4.160.0070.32718.93
5.4.150.0070.32319.21
5.4.140.0070.30716.38
5.4.130.0030.31316.50
5.4.120.0230.29716.38
5.4.110.0000.25016.44
5.4.100.0070.30716.54
5.4.90.0000.27016.52
5.4.80.0030.26716.38
5.4.70.0000.25716.47
5.4.60.0000.33316.45
5.4.50.0100.24316.38
5.4.40.0100.24716.39
5.4.30.0030.26316.29
5.4.20.0000.26716.40
5.4.10.0030.24716.36
5.4.00.0000.24315.90
5.3.290.0030.57714.74
5.3.280.0070.57314.69
5.3.270.0030.52314.57
5.3.260.0070.56314.61
5.3.250.0070.60014.71
5.3.240.0030.56314.66
5.3.230.0030.58014.63
5.3.220.0030.57714.59
5.3.210.0000.58314.52
5.3.200.0030.58714.54
5.3.190.0000.53014.62
5.3.180.0100.57314.58
5.3.170.0030.56314.48
5.3.160.0030.55014.57
5.3.150.0070.54314.63
5.3.140.0000.50014.68
5.3.130.0070.59014.55
5.3.120.0030.44714.54
5.3.110.0000.57014.60
5.3.100.0000.43013.97
5.3.90.0000.49314.03
5.3.80.0000.46014.11
5.3.70.0000.42314.09
5.3.60.0030.51013.94
5.3.50.0000.41313.88
5.3.40.0030.57313.89
5.3.30.0030.58013.83
5.3.20.0000.55313.63
5.3.10.0070.53013.69
5.3.00.0030.59013.71
5.2.170.0000.61712.18
5.2.160.0000.77712.18
5.2.150.0030.78312.18
5.2.140.0000.72712.18
5.2.130.0030.79012.18
5.2.120.0100.74012.18
5.2.110.0030.71312.18
5.2.100.0100.74312.18
5.2.90.0100.77012.18
5.2.80.0070.77012.18
5.2.70.0000.77712.18
5.2.60.0030.77312.18
5.2.50.0070.73012.18
5.2.40.0000.78712.18
5.2.30.0030.73012.18
5.2.20.0000.69712.18
5.2.10.0030.73312.18
5.2.00.0070.83012.18
5.1.60.0030.80312.18
5.1.50.0000.79712.18
5.1.40.0030.80712.18
5.1.30.0000.82012.18
5.1.20.0030.79312.18
5.1.10.0000.80712.18
5.1.00.0030.82012.18
5.0.50.0000.04012.18
5.0.40.0000.05012.18
5.0.30.0030.06312.18
5.0.20.0070.04312.18
5.0.10.0030.04312.18
5.0.00.0000.05712.18
4.4.90.0000.02712.18
4.4.80.0000.03712.18
4.4.70.0070.03012.18
4.4.60.0000.03312.18
4.4.50.0030.03312.18
4.4.40.0030.05012.18
4.4.30.0030.03012.18
4.4.20.0030.03712.18
4.4.10.0000.02312.18
4.4.00.0030.03712.18
4.3.110.0000.03712.18
4.3.100.0030.02312.18
4.3.90.0000.03712.18
4.3.80.0000.05312.18
4.3.70.0070.03012.18
4.3.60.0030.02712.18
4.3.50.0000.03712.18
4.3.40.0000.04712.18
4.3.30.0030.03012.18
4.3.20.0030.03312.18
4.3.10.0000.03312.18
4.3.00.0030.02312.18

preferences:
36.32 ms | 401 KiB | 5 Q