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(100000); echo (microtime() - $t)/1000 . ' ms';

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.10.0070.02415.07
7.4.00.0090.02014.92
7.3.130.0070.02514.79
7.3.120.0050.02414.80
7.3.110.0080.02215.01
7.3.100.0050.02114.91
7.3.90.0090.01614.86
7.3.80.0090.01514.93
7.3.70.0070.01714.85
7.3.60.0110.01514.82
7.3.50.0050.01714.81
7.3.40.0060.02014.84
7.3.30.0050.02014.83
7.3.20.0030.02316.66
7.3.10.0040.02116.66
7.3.00.0060.02016.71
7.2.260.0030.02615.21
7.2.250.0090.02614.87
7.2.240.0100.02015.09
7.2.230.0040.02114.75
7.2.220.0050.02215.00
7.2.210.0010.02514.99
7.2.200.0070.02115.03
7.2.190.0050.02215.04
7.2.180.0020.02315.12
7.2.170.0030.02315.05
7.2.160.0060.02014.93
7.2.150.0080.01816.95
7.2.140.0060.01816.77
7.2.130.0040.02016.95
7.2.120.0060.02416.89
7.2.110.0020.02216.88
7.2.100.0050.02116.85
7.2.90.0080.02117.01
7.2.80.0050.02216.90
7.2.70.0040.02416.91
7.2.60.0050.02016.93
7.2.50.0030.02316.98
7.2.40.0030.02116.80
7.2.30.0060.02016.97
7.2.20.0040.02216.82
7.2.10.0060.02016.90
7.2.00.0030.02517.58
7.1.330.0040.03315.81
7.1.320.0060.03115.87
7.1.310.0060.03115.80
7.1.300.0070.03115.78
7.1.290.0070.03015.74
7.1.280.0050.03415.87
7.1.270.0040.03215.78
7.1.260.0060.03115.85
7.1.250.0030.03615.90
7.1.240.0050.03215.89
7.1.230.0030.03415.82
7.1.220.0050.03115.85
7.1.210.0090.02915.66
7.1.200.0030.03215.77
7.1.190.0050.03015.84
7.1.180.0070.03115.54
7.1.170.0030.03415.97
7.1.160.0050.03415.73
7.1.150.0050.03215.71
7.1.140.0030.03315.73
7.1.130.0000.03415.73
7.1.120.0050.03215.83
7.1.110.0020.03615.78
7.1.100.0080.02915.64
7.1.90.0030.03215.65
7.1.80.0070.02915.98
7.1.70.0040.02616.01
7.1.60.0070.03216.93
7.1.50.0080.03016.28
7.1.40.0050.03315.74
7.1.30.0050.03115.49
7.1.20.0020.03615.72
7.1.10.0060.03215.56
7.1.00.0060.04017.94
7.0.330.0050.03415.43
7.0.320.0020.03615.58
7.0.310.0050.03115.35
7.0.300.0030.03215.46
7.0.290.0070.03015.44
7.0.280.0050.03115.36
7.0.270.0020.03415.51
7.0.260.0070.02815.25
7.0.250.0050.03115.56
7.0.240.0040.02915.43
7.0.230.0050.02615.47
7.0.220.0050.03015.35
7.0.210.0080.02815.38
7.0.200.0100.02315.26
7.0.190.0030.03115.50
7.0.180.0020.03315.43
7.0.170.0050.03315.40
7.0.160.0030.03315.42
7.0.150.0050.03215.38
7.0.140.0010.05517.67
7.0.130.0050.03315.38
7.0.120.0080.04517.73
7.0.110.0100.02715.50
7.0.100.0100.02915.41
7.0.90.0050.03015.55
7.0.80.0000.03315.48
7.0.70.0030.02815.57
7.0.60.0100.04816.84
7.0.50.0070.04616.36
7.0.40.1180.04015.67
7.0.30.1210.03615.67
7.0.20.1380.03615.70
7.0.10.1500.03415.67
7.0.00.1200.03515.72
5.6.400.0070.04614.61
5.6.390.0050.04914.50
5.6.380.0030.05314.25
5.6.370.0060.04414.41
5.6.360.0080.04814.33
5.6.350.0060.04914.20
5.6.340.0050.05114.29
5.6.330.0050.04914.28
5.6.320.0020.05014.26
5.6.310.0030.05014.32
5.6.300.0100.04414.42
5.6.290.0070.05214.43
5.6.280.0080.06516.49
5.6.270.0050.05114.21
5.6.260.0030.04914.33
5.6.250.0050.05014.28
5.6.240.0100.04114.29
5.6.230.0070.04514.27
5.6.220.0070.04914.16
5.6.210.0020.07416.49
5.6.200.0070.07015.55
5.6.190.1230.05316.36
5.6.180.1100.05816.49
5.6.170.1160.05716.35
5.6.160.1170.05216.54
5.6.150.1240.05016.36
5.6.140.1230.05616.30
5.6.130.1180.05516.45
5.6.120.0460.05916.27
5.6.110.0070.06616.40
5.6.100.1310.05216.44
5.6.90.1300.05116.38
5.6.80.1450.05316.00
5.6.70.1240.05215.98
5.6.60.1410.05216.07
5.6.50.1490.04816.11
5.6.40.1120.05516.01
5.6.30.1170.05315.98
5.6.20.1220.05116.19
5.6.10.1420.05116.06
5.6.00.1330.05316.04
5.5.380.0030.05114.41
5.5.370.0110.04214.27
5.5.360.0030.04814.19
5.5.350.0140.05416.29
5.5.340.0050.04915.44
5.5.330.0440.05916.31
5.5.320.1120.05916.19
5.5.310.1370.05116.27
5.5.300.1130.05516.35
5.5.290.1410.05716.12
5.5.280.0090.06616.21
5.5.270.0080.06816.12
5.5.260.1110.05416.25
5.5.250.1410.05316.19
5.5.240.1430.05116.09
5.5.230.1260.05215.90
5.5.220.1240.05015.92
5.5.210.1420.04815.89
5.5.200.1210.05015.95
5.5.190.1160.05015.93
5.5.180.1260.05615.88
5.5.170.0050.04914.08
5.5.160.1220.05315.99
5.5.150.1400.05715.92
5.5.140.1500.05215.93
5.5.130.1440.05515.98
5.5.120.1410.05415.95
5.5.110.1460.05415.97
5.5.100.1470.05215.79
5.5.90.1430.05616.00
5.5.80.1330.05415.97
5.5.70.1290.05815.95
5.5.60.1260.05315.79
5.5.50.1340.05415.92
5.5.40.1140.05015.95
5.5.30.1190.05415.96
5.5.20.1160.05115.94
5.5.10.0490.05715.87
5.5.00.0210.05415.75
5.4.450.1370.05413.98
5.4.440.0070.05813.76
5.4.430.0440.05613.96
5.4.420.1240.05413.97
5.4.410.1270.05113.99
5.4.400.1440.05013.74
5.4.390.1110.05213.75
5.4.380.1420.04713.81
5.4.370.1460.05113.61
5.4.360.1470.04913.62
5.4.350.1250.04913.55
5.4.340.1400.04913.67
5.4.330.0070.04711.00
5.4.320.1400.05213.78
5.4.310.1390.04813.68
5.4.300.1430.05113.77
5.4.290.1220.05313.79
5.4.280.1480.05013.75
5.4.270.1310.05813.79
5.4.260.1460.05213.67
5.4.250.1420.05213.80
5.4.240.1370.05113.66
5.4.230.1410.05613.69
5.4.220.1240.05213.77
5.4.210.1200.05313.74
5.4.200.1200.05813.66
5.4.190.1030.05913.48
5.4.180.1080.05813.71
5.4.170.0030.07313.65
5.4.160.0990.04913.71
5.4.150.1090.05213.72
5.4.140.1090.05112.79
5.4.130.1090.05313.00
5.4.120.1270.04712.89
5.4.110.1410.05012.77
5.4.100.1330.04912.76
5.4.90.1330.05212.93
5.4.80.1200.05512.75
5.4.70.0030.05412.75
5.4.60.0050.05712.85
5.4.50.1260.05112.90
5.4.40.1160.05112.80
5.4.30.1400.05312.76
5.4.20.1300.05212.71
5.4.10.1450.05212.90
5.4.00.1450.04812.55
5.3.290.1230.06812.01
5.3.280.1230.07511.84
5.3.270.0010.07111.91
5.3.260.1040.07111.83
5.3.250.1040.07111.89
5.3.240.1080.06711.90
5.3.230.1210.07111.95
5.3.220.1220.07111.77
5.3.210.1330.06911.80
5.3.200.1270.06911.79
5.3.190.1410.06611.77
5.3.180.1080.06811.94
5.3.170.0060.08411.99
5.3.160.1180.06911.99
5.3.150.1480.06511.90
5.3.140.1340.06811.80
5.3.130.1380.07011.88
5.3.120.1420.06711.98
5.3.110.1410.06711.79
5.3.100.1420.06811.73
5.3.90.1430.06811.81
5.3.80.1450.06611.64
5.3.70.1300.06511.62
5.3.60.1240.07111.80
5.3.50.1220.06711.57
5.3.40.1140.06511.66
5.3.30.1160.06611.75
5.3.20.1100.07011.59
5.3.10.1260.06511.43
5.3.00.1200.06711.39
5.2.170.2900.09011.37
5.2.160.2630.09711.05
5.2.150.2900.10011.13
5.2.140.2670.10011.16
5.2.130.3430.09710.97
5.2.120.2700.09311.33
5.2.110.3200.09711.32
5.2.100.3630.09011.18
5.2.90.3470.09711.18
5.2.80.3670.09711.18
5.2.70.3270.10311.21
5.2.60.3430.09711.13
5.2.50.3430.09711.07
5.2.40.2700.09711.08
5.2.30.2800.09710.98
5.2.20.2700.08711.04
5.2.10.2430.10010.90
5.2.00.2730.10010.82
5.1.60.2900.09710.05
5.1.50.2930.09710.00
5.1.40.2600.09710.09
5.1.30.2630.10010.55
5.1.20.2930.10310.41
5.1.10.2230.09710.07
5.1.00.2830.1039.97
5.0.50.1570.0238.53
5.0.40.1430.0238.36
5.0.30.1300.0308.22
5.0.20.1270.0208.20
5.0.10.1300.0208.28
5.0.00.1170.0308.22
4.4.90.1670.0176.60
4.4.80.0970.0106.60
4.4.70.1570.0136.60
4.4.60.1400.0176.60
4.4.50.1270.0176.60
4.4.40.1630.0306.60
4.4.30.1630.0136.60
4.4.20.1370.0176.60
4.4.10.1500.0206.60
4.4.00.1530.0276.60
4.3.110.1230.0206.60
4.3.100.1430.0136.60
4.3.90.1030.0206.60
4.3.80.1100.0276.60
4.3.70.1570.0176.60
4.3.60.1300.0176.60
4.3.50.1530.0176.60
4.3.40.0830.0276.60
4.3.30.0670.0206.60
4.3.20.0800.0206.60
4.3.10.0830.0236.60
4.3.00.0670.0106.60

preferences:
41.36 ms | 401 KiB | 5 Q