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) . ' 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.3.120.0070.02114.89
7.3.110.0030.02115.01
7.3.100.0100.01614.96
7.3.90.0070.01614.94
7.3.80.0000.02714.80
7.3.70.0090.01814.60
7.3.60.0150.02114.97
7.3.50.0000.02514.91
7.3.40.0040.02414.97
7.3.30.0100.01714.87
7.3.20.0070.01716.77
7.3.10.0030.01716.70
7.3.00.0030.02916.70
7.2.240.0030.02615.01
7.2.230.0030.02115.33
7.2.220.0100.02014.82
7.2.210.0000.03314.92
7.2.200.0070.02614.91
7.2.190.0070.02415.05
7.2.180.0040.02815.08
7.2.170.0100.02714.88
7.2.160.0030.02415.16
7.2.150.0040.02516.77
7.2.140.0060.02516.69
7.2.130.0070.02216.96
7.2.120.0100.01616.77
7.2.110.0070.01816.70
7.2.100.0080.01816.68
7.2.90.0080.02016.77
7.2.80.0000.02316.70
7.2.70.0080.01716.79
7.2.60.0020.02616.87
7.2.50.0100.01816.85
7.2.40.0110.01416.99
7.2.30.0030.02216.78
7.2.20.0050.02116.88
7.2.10.0050.02216.83
7.2.00.0060.01817.02
7.1.330.0030.03115.76
7.1.320.0000.03715.90
7.1.310.0030.03215.80
7.1.300.0120.02815.48
7.1.290.0030.03715.86
7.1.280.0000.04415.85
7.1.270.0070.02815.58
7.1.260.0100.02715.55
7.1.250.0030.03715.84
7.1.240.0070.02016.03
7.1.230.0070.01715.75
7.1.220.0000.02215.84
7.1.210.0030.02015.96
7.1.200.0100.01315.52
7.1.190.0070.01715.93
7.1.180.0100.01315.69
7.1.170.0060.01915.90
7.1.160.0060.01815.83
7.1.150.0000.02215.75
7.1.140.0040.01915.79
7.1.130.0070.01715.84
7.1.120.0070.02015.85
7.1.110.0030.01915.96
7.1.100.0070.01715.73
7.1.90.0000.02215.89
7.1.80.0100.01315.84
7.1.70.0100.01516.56
7.1.60.0050.01716.39
7.1.50.0100.02316.32
7.1.40.0040.02115.78
7.1.30.0100.01415.87
7.1.20.0100.01715.66
7.1.10.0040.02215.85
7.1.00.0030.05119.09
7.0.320.0000.02215.43
7.0.310.0060.01615.20
7.0.300.0100.01315.40
7.0.290.0060.01915.50
7.0.280.0120.01215.34
7.0.270.0060.01615.18
7.0.260.0070.01715.24
7.0.250.0060.01215.21
7.0.240.0110.01415.39
7.0.230.0060.01915.47
7.0.220.0120.01215.43
7.0.210.0030.02415.55
7.0.200.0060.02316.10
7.0.190.0040.01815.43
7.0.180.0100.01315.44
7.0.170.0030.02115.44
7.0.160.0070.01715.55
7.0.150.0030.02015.35
7.0.140.0050.05418.76
7.0.130.0070.01315.37
7.0.120.0040.02215.27
7.0.110.0060.01815.50
7.0.100.0060.01515.54
7.0.90.0040.01915.36
7.0.80.0090.01615.42
7.0.70.0040.01815.46
7.0.60.0030.05917.79
7.0.50.0060.05616.61
7.0.40.0070.05316.80
7.0.30.0080.03316.88
7.0.20.0160.04616.95
7.0.10.0050.04816.90
7.0.00.0030.05716.81
5.6.380.0000.03814.56
5.6.370.0000.03814.59
5.6.360.0090.02814.30
5.6.350.0070.02714.36
5.6.340.0030.03314.08
5.6.330.0100.02914.33
5.6.320.0100.02814.30
5.6.310.0000.03314.59
5.6.300.0060.03514.32
5.6.290.0100.03214.57
5.6.280.0050.07017.68
5.6.270.0090.03114.48
5.6.260.0100.03014.40
5.6.250.0060.03414.39
5.6.240.0100.02414.39
5.6.230.0030.03214.52
5.6.220.0030.03614.16
5.6.210.0100.07017.62
5.6.200.0030.07216.33
5.6.190.0060.07617.51
5.6.180.0130.06917.54
5.6.170.0130.05417.35
5.6.160.0080.07517.56
5.6.150.0070.04616.34
5.6.140.0100.04616.14
5.6.130.0070.04716.32
5.6.120.0060.05617.70
5.6.110.0100.04317.62
5.6.100.0070.07617.69
5.6.90.0050.07417.74
5.6.80.0050.04517.32
5.6.70.0070.03314.10
5.6.60.0070.03114.27
5.6.50.0060.03214.29
5.6.40.0030.03814.42
5.6.30.0060.03614.05
5.6.20.0030.03414.00
5.6.10.0000.03914.21
5.6.00.0000.03514.28
5.5.380.0040.03311.43
5.5.370.0030.03511.27
5.5.360.0000.03111.07
5.5.350.1130.04815.84
5.5.340.0050.07214.57
5.5.330.0030.05815.79
5.5.320.0230.05715.78
5.5.310.0150.07315.87
5.5.300.0030.06614.70
5.5.290.0060.05614.53
5.5.280.0100.06915.97
5.5.270.0030.07116.06
5.5.260.0050.07316.14
5.5.250.0080.06415.92
5.5.240.0120.06615.76
5.5.230.0070.03111.11
5.5.220.0060.02811.07
5.5.210.0120.02811.07
5.5.200.0030.03611.25
5.5.190.0030.02611.07
5.5.180.0070.03011.19
5.5.170.0030.03314.25
5.5.160.0030.03611.25
5.5.150.0000.03911.45
5.5.140.0000.03611.07
5.5.130.0060.02911.07
5.5.120.0040.03211.29
5.5.110.0070.02911.16
5.5.100.0030.03911.22
5.5.90.0030.03111.27
5.5.80.0070.03611.21
5.5.70.0060.02911.07
5.5.60.0030.03611.23
5.5.50.0040.03311.07
5.5.40.0100.02911.17
5.5.30.0070.02711.27
5.5.20.0100.02911.16
5.5.10.0030.03511.07
5.5.00.0030.03011.25
5.4.450.0150.05515.37
5.4.440.0150.05015.28
5.4.430.0150.06015.27
5.4.420.0120.07015.46
5.4.410.0180.06515.14
5.4.400.0150.06815.12
5.4.390.0130.06015.15
5.4.380.0170.06315.16
5.4.370.0170.06315.24
5.4.360.0120.06715.10
5.4.350.0180.06215.15
5.4.340.0130.06715.08
5.4.330.0100.03211.07
5.4.320.0150.06115.15
5.4.310.0180.04915.26
5.4.300.0180.05915.20
5.4.290.0130.07515.07
5.4.280.0130.06015.11
5.4.270.0200.05315.13
5.4.260.0120.05915.26
5.4.250.0080.05515.17
5.4.240.0080.05114.95
5.4.230.0150.04615.12
5.4.220.0130.04315.15
5.4.210.0130.06015.01
5.4.200.0170.06715.05
5.4.190.0170.05415.12
5.4.180.0150.06915.10
5.4.170.0170.06815.15
5.4.160.0150.06815.07
5.4.150.0100.04915.11
5.4.140.0130.05413.79
5.4.130.0170.06513.82
5.4.120.0180.06313.75
5.4.110.0200.06113.66
5.4.100.0170.06013.90
5.4.90.0150.06113.81
5.4.80.0170.06413.65
5.4.70.0100.05113.86
5.4.60.0130.06513.74
5.4.50.0170.06513.73
5.4.40.0180.07413.78
5.4.30.0110.05413.78
5.4.20.0130.04813.75
5.4.10.0150.06913.71
5.4.00.0130.04713.48
5.3.290.0180.06612.95
5.3.280.0170.06912.86
5.3.270.0100.07812.79
5.3.260.0130.06212.88
5.3.250.0100.05812.91
5.3.240.0250.05212.84
5.3.230.0120.07712.82
5.3.220.0120.05912.78
5.3.210.0130.07312.81
5.3.200.0080.05512.78
5.3.190.0100.05012.80
5.3.180.0130.05812.86
5.3.170.0120.06312.88
5.3.160.0130.07012.88
5.3.150.0100.07312.77
5.3.140.0130.05912.81
5.3.130.0100.05512.86
5.3.120.0120.07312.80
5.3.110.0150.05912.77
5.3.100.0100.04712.52
5.3.90.0130.07112.58
5.3.80.0120.06712.55
5.3.70.0120.07212.61
5.3.60.0130.05912.55
5.3.50.0150.07212.47
5.3.40.0150.07212.54
5.3.30.0170.06912.50
5.3.20.0180.06812.38
5.3.10.0120.07112.37
5.3.00.0130.07112.35
5.2.170.0170.08511.90
5.2.160.0130.07111.90
5.2.150.0080.08411.90
5.2.140.0130.07411.90
5.2.130.0080.08911.90
5.2.120.0120.08811.90
5.2.110.0120.08511.90
5.2.100.0100.08511.90
5.2.90.0130.07911.90
5.2.80.0120.09111.90
5.2.70.0100.08011.90
5.2.60.0130.08411.90
5.2.50.0120.07911.90
5.2.40.0130.07511.90
5.2.30.0130.07811.90
5.2.20.0120.08711.90
5.2.10.0080.08611.90
5.2.00.0100.09111.90
5.1.60.0100.09111.90
5.1.50.0080.09511.90
5.1.40.0130.08111.90
5.1.30.0100.06411.90
5.1.20.0200.06411.90
5.1.10.0100.08611.90
5.1.00.0070.06411.90
5.0.50.0030.01311.90
5.0.40.0080.01211.90
5.0.30.0030.01811.90
5.0.20.0050.01211.90
5.0.10.0030.01111.90
5.0.00.0050.01611.90
4.4.90.0030.01011.90
4.4.80.0080.00711.90
4.4.70.0030.01011.90
4.4.60.0030.01011.90
4.4.50.0080.00511.90
4.4.40.0030.01511.90
4.4.30.0050.01011.90
4.4.20.0030.01111.90
4.4.10.0000.01211.90
4.4.00.0040.01311.90
4.3.110.0030.01011.90
4.3.100.0030.01011.90
4.3.90.0030.01011.90
4.3.80.0030.01611.90
4.3.70.0020.01111.90
4.3.60.0050.00811.90
4.3.50.0020.01111.90
4.3.40.0020.01511.90
4.3.30.0040.00711.90
4.3.20.0000.01111.90
4.3.10.0000.01111.90
4.3.00.0000.01111.90

preferences:
40.61 ms | 401 KiB | 5 Q