3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(); $i = 0; $start = microtime(true); for($i = 0; $i < 100000; $i++) { if(count($test)) { throw new Exception(); } } $middle = microtime(true); for($i = 0; $i < 100000; $i++) { if (!empty($test)) { throw new Exception(); } } $end = microtime(true); echo ($middle - $start) . chr(10); echo ($end - $middle) . chr(10); ?>

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.0100.01015.21
7.3.120.0030.01914.54
7.3.110.0070.01514.86
7.3.100.0100.01014.84
7.3.90.0040.01415.08
7.3.80.0030.01414.88
7.3.70.0120.00714.71
7.3.60.0060.01114.73
7.3.50.0090.00914.56
7.3.40.0050.01314.86
7.3.30.0060.01514.77
7.3.20.0050.01516.58
7.3.10.0070.01216.70
7.3.00.0050.01216.63
7.2.250.0000.02214.73
7.2.240.0060.01314.99
7.2.230.0070.01114.98
7.2.220.0080.01214.92
7.2.210.0030.01215.07
7.2.200.0030.01415.01
7.2.190.0080.01015.17
7.2.180.0100.00815.06
7.2.170.0040.01114.95
7.2.160.0100.00715.22
7.2.150.0000.01216.83
7.2.140.0030.01616.70
7.2.130.0090.00917.03
7.2.120.0100.01016.87
7.2.110.0070.01717.00
7.2.100.0100.01016.90
7.2.90.0070.01316.80
7.2.80.0100.01016.81
7.2.70.0000.01517.11
7.2.60.0100.01017.01
7.2.50.0070.01416.96
7.2.40.0000.01417.00
7.2.30.0070.01416.70
7.2.20.0070.01416.95
7.2.10.0070.01116.79
7.2.00.0040.01818.01
7.1.330.0080.02015.83
7.1.320.0080.01715.83
7.1.310.0030.02215.86
7.1.300.0050.02315.53
7.1.290.0100.01915.72
7.1.280.0070.02015.62
7.1.270.0100.01615.80
7.1.260.0050.02315.71
7.1.250.0070.02015.89
7.1.70.0150.00616.93
7.1.60.0100.00717.19
7.1.50.0000.01516.68
7.1.40.0070.01116.74
7.1.30.0030.01616.67
7.1.20.0070.01016.77
7.1.10.0000.01316.54
7.1.00.0000.01216.71
7.0.200.0000.01316.69
7.0.190.0040.01116.73
7.0.180.0000.01216.39
7.0.170.0030.01016.23
7.0.160.0060.01316.25
7.0.150.0030.01016.41
7.0.140.0000.01416.46
7.0.130.0000.01416.50
7.0.120.0030.01016.73
7.0.110.0000.02416.36
7.0.100.0090.00916.33
7.0.90.0030.01016.25
7.0.80.0000.01416.45
7.0.70.0060.00616.40
7.0.60.0030.00916.34
7.0.50.0030.00916.51
7.0.40.0030.01015.24
7.0.30.0030.01515.24
7.0.20.0000.01315.24
7.0.10.0070.01715.24
7.0.00.0000.01415.24
5.6.300.0060.05220.60
5.6.290.0140.05120.67
5.6.280.0030.06020.81
5.6.270.0000.06421.06
5.6.260.0030.05120.84
5.6.250.0100.07520.97
5.6.240.0030.05621.04
5.6.230.0140.05420.92
5.6.220.0000.06020.80
5.6.210.0100.05321.04
5.6.200.0130.05220.82
5.6.190.0030.09721.02
5.6.180.0100.09120.82
5.6.170.0100.08820.82
5.6.160.0000.05420.92
5.6.150.0030.06820.93
5.6.140.0130.05220.81
5.6.130.0100.04620.97
5.6.120.0030.08921.02
5.6.110.0070.06220.97
5.6.100.0000.07620.75
5.6.90.0070.06020.96
5.6.80.0030.05320.33
5.6.70.0240.05120.23
5.6.60.0000.06620.36
5.6.50.0000.05720.23
5.6.40.0070.08620.29
5.6.30.0100.05320.05
5.6.20.0070.05720.19
5.6.10.0070.05220.12
5.6.00.0000.06020.19
5.5.380.0030.05517.48
5.5.370.0070.07017.45
5.5.360.0030.05717.50
5.5.350.0030.05517.46
5.5.340.0070.05318.00
5.5.330.0030.06017.96
5.5.320.0060.04818.00
5.5.310.0070.05417.97
5.5.300.0000.05717.97
5.5.290.0100.05218.06
5.5.280.0070.05018.05
5.5.270.0060.05817.83
5.5.260.0030.07217.96
5.5.250.0330.05017.86
5.5.240.0000.05517.44
5.5.230.0030.06717.41
5.5.220.0000.07017.32
5.5.210.0000.08917.32
5.5.200.0000.05117.38
5.5.190.0030.06317.29
5.5.180.0100.05917.41
5.5.160.0030.04917.30
5.5.150.0070.06617.40
5.5.140.0030.05617.05
5.5.130.0030.05417.28
5.5.120.0000.06217.29
5.5.110.0070.08117.29
5.5.100.0000.06317.32
5.5.90.0030.08717.11
5.5.80.0030.05317.27
5.5.70.0000.05717.30
5.5.60.0130.04717.18
5.5.50.0030.06717.31
5.5.40.0070.04417.30
5.5.30.0030.04817.27
5.5.20.0100.10417.22
5.5.10.0030.10317.27
5.5.00.0410.04417.09
5.4.450.0030.05119.32
5.4.440.0030.06319.44
5.4.430.0000.05819.40
5.4.420.0100.06219.31
5.4.410.0260.05519.33
5.4.400.0030.04718.86
5.4.390.0030.04819.11
5.4.380.0000.05619.07
5.4.370.0000.05719.01
5.4.360.0030.05419.14
5.4.350.0070.05118.84
5.4.340.0000.06418.96
5.4.320.0030.09518.82
5.4.310.0030.05718.97
5.4.300.0170.06118.98
5.4.290.0030.05318.86
5.4.280.0100.04919.13
5.4.270.0000.05119.04
5.4.260.0000.07118.81
5.4.250.0100.05318.81
5.4.240.0030.05118.84
5.4.230.0070.04618.89
5.4.220.0000.06119.00
5.4.210.0000.07018.98
5.4.200.0030.05719.02
5.4.190.0030.04918.95
5.4.180.0130.03818.96
5.4.170.0030.09619.07
5.4.160.0040.05318.84
5.4.150.0070.10319.11
5.4.140.0070.05016.46
5.4.130.0030.05916.59
5.4.120.0060.04516.64
5.4.110.0160.05316.55
5.4.100.0030.05216.61
5.4.90.0000.05416.45
5.4.80.0030.04916.64
5.4.70.0100.05116.32
5.4.60.0030.05016.42
5.4.50.0000.06516.31
5.4.40.0030.05116.43
5.4.30.0030.05616.36
5.4.20.0070.06816.57
5.4.10.0070.06016.39
5.4.00.0070.04416.09
5.3.290.0030.06315.24
5.3.280.0070.05515.24
5.3.270.0030.06715.24
5.3.260.0030.08415.24
5.3.250.0000.05215.24
5.3.240.0030.05615.24
5.3.230.0030.06815.24
5.3.220.0030.05615.24
5.3.210.0030.05915.24
5.3.200.0070.05515.24
5.3.190.0000.05515.24
5.3.180.0070.04715.24
5.3.170.0070.05015.24
5.3.160.0070.05715.24
5.3.150.0000.05815.24
5.3.140.0070.04715.24
5.3.130.0100.04815.24
5.3.120.0230.05515.24
5.3.110.0030.10615.24
5.3.100.0000.05215.24
5.3.90.0000.05715.24
5.3.80.0000.08015.24
5.3.70.0030.04815.24
5.3.60.0060.05115.24
5.3.50.0100.05215.24
5.3.40.0000.05415.24
5.3.30.0030.05615.24
5.3.20.0000.05815.24
5.3.10.0000.06315.24
5.3.00.0000.05415.24
5.2.170.0000.06815.24
5.2.160.0030.06515.24
5.2.150.0000.06315.24
5.2.140.0000.06215.24
5.2.130.0030.05015.24
5.2.120.0030.05515.24
5.2.110.0000.05215.24
5.2.100.0100.04215.24
5.2.90.0000.05415.24
5.2.80.0000.06515.24
5.2.70.0000.05515.24
5.2.60.0030.05315.24
5.2.50.0000.05115.24
5.2.40.0000.04715.24
5.2.30.0030.04515.24
5.2.20.0000.05115.24
5.2.10.0000.05015.24
5.2.00.0000.06115.24
5.1.60.0000.04915.24
5.1.50.0000.05015.24
5.1.40.0040.04215.24
5.1.30.0000.05815.24
5.1.20.0000.04415.24
5.1.10.0000.04415.24
5.1.00.0030.04915.24
5.0.50.0070.05015.24
5.0.40.0000.06115.24
5.0.30.0030.06815.24
5.0.20.0240.05715.24
5.0.10.0030.06915.24
5.0.00.0000.07215.24
4.4.90.0030.01915.24
4.4.80.0000.01715.24
4.4.70.0000.01715.24
4.4.60.0100.01615.24
4.4.50.0030.01415.24
4.4.40.0000.02915.24
4.4.30.0000.01915.24
4.4.20.0110.00615.24
4.4.10.0060.01115.24
4.4.00.0040.02515.24
4.3.110.0000.01915.24
4.3.100.0070.01315.24
4.3.90.0060.01815.24
4.3.80.0030.02215.24
4.3.70.0000.01615.24
4.3.60.0130.01315.24
4.3.50.0000.01815.24
4.3.40.0030.02315.24
4.3.30.0000.02215.24
4.3.20.0000.02215.24
4.3.10.0030.01715.24
4.3.00.0000.01615.24

preferences:
38.01 ms | 400 KiB | 5 Q