3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $throw; $throw = true; 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) { $error = true; } } } $n = 100000; $t = microtime(true); test($n); echo (microtime(true) - $t)*1000000/$n . ' us/iteration';

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.4.00.0130.10215.00
7.3.120.0130.16314.55
7.3.110.0100.16614.77
7.3.100.0070.11114.90
7.3.90.0070.16714.71
7.3.80.0100.10314.86
7.3.70.0030.10914.79
7.3.60.0030.10914.77
7.3.50.0070.10214.83
7.3.40.0100.13514.96
7.3.30.0000.14115.01
7.3.20.0030.11516.77
7.3.10.0100.09816.81
7.3.00.0030.10816.46
7.2.250.0100.13415.30
7.2.240.0000.19415.15
7.2.230.0070.19015.05
7.2.220.0030.12614.98
7.2.210.0030.14214.99
7.2.200.0000.13915.18
7.2.190.0000.12814.82
7.2.180.0030.14615.09
7.2.170.0030.12615.07
7.2.00.0030.09819.41
7.1.330.0030.14915.86
7.1.320.0000.19315.65
7.1.310.0030.21415.91
7.1.300.0070.14815.59
7.1.290.0000.16115.70
7.1.280.0030.17815.77
7.1.270.0070.14715.59
7.1.260.0000.14615.57
7.1.70.0070.10617.19
7.1.60.0030.10517.00
7.1.50.0000.10516.83
7.1.00.0030.14322.30
7.0.200.0070.18816.61
7.0.140.0030.25321.99
7.0.100.0430.21320.08
7.0.90.0070.24319.92
7.0.80.0030.21719.83
7.0.70.0070.21719.89
7.0.60.0030.22320.03
7.0.50.0030.23020.30
7.0.40.0170.23020.06
7.0.30.0030.23720.09
7.0.20.0100.20019.96
7.0.10.0030.21720.18
7.0.00.0170.20320.18
5.6.280.0130.34021.12
5.6.250.0070.34720.71
5.6.240.0170.35020.48
5.6.230.0030.35720.68
5.6.220.0030.35320.59
5.6.210.0000.36720.59
5.6.200.0100.36321.11
5.6.190.0070.35721.05
5.6.180.0100.31021.06
5.6.170.0070.32320.95
5.6.160.0130.37321.07
5.6.150.0070.36721.20
5.6.140.0130.37021.02
5.6.130.0100.34020.96
5.6.120.0130.34721.05
5.6.110.0030.38021.02
5.6.100.0000.37020.93
5.6.90.0070.36021.02
5.6.80.0100.37720.46
5.6.70.0030.35020.44
5.6.60.0030.38320.30
5.6.50.0030.36720.46
5.6.40.0070.37720.39
5.6.30.0100.29720.42
5.6.20.0500.22720.44
5.6.10.0070.32720.32
5.6.00.0000.30320.48
5.5.380.0100.37720.41
5.5.370.0030.35720.35
5.5.360.0100.35320.34
5.5.350.0030.35320.42
5.5.340.0130.34020.91
5.5.330.0100.36020.79
5.5.320.0070.35720.95
5.5.310.0100.37020.81
5.5.300.0000.36320.89
5.5.290.0070.35320.84
5.5.280.0030.37320.90
5.5.270.0030.35720.91
5.5.260.0170.37320.93
5.5.250.0100.38020.70
5.5.240.0170.35020.20
5.5.230.0070.36720.22
5.5.220.0130.35320.18
5.5.210.0000.35320.01
5.5.200.0030.39720.24
5.5.190.0030.30320.10
5.5.180.0130.29720.28
5.5.160.0070.31020.27
5.5.150.0070.31020.13
5.5.140.0030.30720.09
5.5.130.0070.28020.12
5.5.120.0070.30320.25
5.5.110.0100.34720.15
5.5.100.0100.35720.09
5.5.90.0070.35720.05
5.5.80.0070.33020.12
5.5.70.0130.35020.01
5.5.60.0100.34020.09
5.5.50.0070.36020.11
5.5.40.0030.34720.04
5.5.30.0030.36720.06
5.5.20.0100.35020.10
5.5.10.0070.39320.05
5.5.00.0100.34720.00
5.4.450.0030.37319.48
5.4.440.0130.34319.47
5.4.430.0130.34319.22
5.4.420.0000.36319.45
5.4.410.0600.26319.34
5.4.400.0070.35719.06
5.4.390.0100.33319.14
5.4.380.0130.39319.18
5.4.370.0000.36019.16
5.4.360.0070.35318.88
5.4.350.0030.31319.13
5.4.340.0100.32019.14
5.4.320.0000.29718.90
5.4.310.0030.32319.04
5.4.300.0500.24319.23
5.4.290.0100.31318.85
5.4.280.0030.24718.95
5.4.270.0030.34319.23
5.4.260.0100.35019.04
5.4.250.0100.36319.04
5.4.240.0070.35019.13
5.4.230.0030.37019.22
5.4.220.0130.35319.00
5.4.210.0070.34318.85
5.4.200.0130.34018.90
5.4.190.0070.36019.23
5.4.180.0030.34319.20
5.4.170.0130.34019.02
5.4.160.0030.37319.02
5.4.150.0030.35319.21
5.4.140.0100.35016.31
5.4.130.0000.34316.30
5.4.120.0100.35316.46
5.4.110.0170.34316.48
5.4.100.0200.36316.40
5.4.90.0030.33316.33
5.4.80.0130.33316.43
5.4.70.0070.33716.54
5.4.60.0070.34016.49
5.4.50.0170.34716.44
5.4.40.0130.36316.42
5.4.30.0130.33716.46
5.4.20.0030.36016.44
5.4.10.0100.33016.29
5.4.00.0030.34715.70
5.3.290.0030.38014.74
5.3.280.0070.41314.61
5.3.270.0030.39314.74
5.3.260.0070.39714.59
5.3.250.0030.37314.71
5.3.240.0030.46714.71
5.3.230.0070.41314.66
5.3.220.0030.40314.64
5.3.210.0100.39014.61
5.3.200.0100.41014.56
5.3.190.0030.41314.66
5.3.180.0070.39314.51
5.3.170.0000.41014.72
5.3.160.0070.42714.51
5.3.150.0070.42014.64
5.3.140.0070.40314.69
5.3.130.0030.42314.48
5.3.120.0100.40714.54
5.3.110.0100.42014.48
5.3.100.0070.42314.14
5.3.90.0100.38714.00
5.3.80.0030.37014.16
5.3.70.0070.42013.97
5.3.60.0030.40313.93
5.3.50.0100.40313.95
5.3.40.0070.41014.01
5.3.30.0030.40713.95
5.3.20.0030.48313.65
5.3.10.0030.39313.65
5.3.00.0070.43313.54
5.2.170.0130.46711.22
5.2.160.0030.44011.28
5.2.150.0000.42011.19
5.2.140.0100.40011.24
5.2.130.0000.42311.07
5.2.120.0070.41010.98
5.2.110.0030.41710.97
5.2.100.0100.41010.99
5.2.90.0030.41311.13
5.2.80.0000.43011.14
5.2.70.0100.42710.97
5.2.60.0030.40311.00
5.2.50.0070.43711.05
5.2.40.0000.46710.94
5.2.30.0030.46711.04
5.2.20.0130.46710.92
5.2.10.0030.54010.90
5.2.00.0070.44010.90
5.1.60.0100.40710.90
5.1.50.0070.43710.90
5.1.40.0100.41310.90
5.1.30.0030.44010.90
5.1.20.0070.42710.90
5.1.10.0070.41310.90
5.1.00.0130.42010.90
5.0.50.0030.04710.90
5.0.40.0070.04010.90
5.0.30.0030.06710.90
5.0.20.0000.05010.90
5.0.10.0030.04010.90
5.0.00.0030.06710.90
4.4.90.0070.03310.90
4.4.80.0000.03710.90
4.4.70.0070.03310.90
4.4.60.0100.02010.90
4.4.50.0000.02710.90
4.4.40.0030.05310.90
4.4.30.0000.03710.90
4.4.20.0030.03710.90
4.4.10.0000.03710.90
4.4.00.0030.03710.90
4.3.110.0000.03710.90
4.3.100.0070.03010.90
4.3.90.0070.03010.90
4.3.80.0030.05310.90
4.3.70.0070.03010.90
4.3.60.0000.02310.90
4.3.50.0000.03710.90
4.3.40.0030.04010.90
4.3.30.0000.03710.90
4.3.20.0000.04010.90
4.3.10.0000.02310.90
4.3.00.0030.03310.90

preferences:
34.42 ms | 401 KiB | 5 Q