3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $startMemory = memory_get_usage(); $array = range(1, 100000); foreach($array as $k=>$arr){ if($k%1000 == 0){ //echo memory_get_usage() - $startMemory, ' bytes'; } } echo 'Finnally' . memory_get_usage() - $startMemory, ' bytes';

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0040.01523.25
7.1.70.0130.01020.94
7.1.60.0060.00921.29
7.1.50.0100.01920.82
7.1.00.0000.08326.24
7.0.200.0100.00720.55
7.0.140.0030.07726.07
7.0.60.0030.05722.77
7.0.50.0030.08320.66
7.0.40.0000.05022.61
7.0.30.0370.08322.64
7.0.20.0300.04322.64
7.0.10.0000.09722.78
7.0.00.0070.09022.58
5.6.280.0070.10034.89
5.6.210.0170.06034.68
5.6.200.0200.08732.07
5.6.190.0100.06034.18
5.6.180.0330.06034.43
5.6.170.0300.08334.35
5.6.160.0130.05334.42
5.6.150.0170.09032.08
5.6.140.0130.10032.10
5.6.130.0100.06732.14
5.6.120.0230.09035.13
5.6.110.0170.10735.16
5.6.100.0130.09035.02
5.6.90.0100.10735.00
5.6.80.0230.09334.41
5.5.350.0370.10034.44
5.5.340.0070.06331.96
5.5.330.0230.09034.08
5.5.320.0370.09734.15
5.5.310.0300.07334.07
5.5.300.0030.05731.91
5.5.290.0130.05032.00
5.5.280.0130.05734.79
5.5.270.0170.09034.83
5.5.260.0170.08734.92
5.5.250.0230.09734.49
5.5.240.0100.08034.22
5.4.450.1030.11333.50
5.4.440.1230.12733.58
5.4.430.0130.08733.22
5.4.420.0230.07733.31
5.4.410.0270.06732.95
5.4.400.0130.08032.61
5.4.390.0130.08032.50
5.4.380.0170.08332.61
5.4.370.0370.06332.51
5.4.360.0330.07032.70
5.4.350.0270.07332.66
5.4.340.0300.06732.74
5.4.320.0110.05226.49
5.4.310.0060.05726.48
5.4.300.0100.05226.49
5.4.290.0090.06626.48
5.4.280.0150.04826.38
5.4.270.0270.10332.68
5.4.260.0400.08032.64
5.4.250.0170.09732.80
5.4.240.0230.07332.80
5.4.230.0200.09732.61
5.4.220.0300.09732.80
5.4.210.0300.10732.92
5.4.200.0230.09332.83
5.4.190.0200.11332.79
5.4.180.0270.08332.91
5.4.170.0200.10032.80
5.4.160.0200.07332.75
5.4.150.0270.10032.89
5.4.140.0200.08730.26
5.4.130.0330.06730.27
5.4.120.0200.09730.26
5.4.110.0330.08330.36
5.4.100.0370.07730.41
5.4.90.0270.07030.27
5.4.80.0130.07730.41
5.4.70.0230.09730.25
5.4.60.0300.09330.43
5.4.50.0170.07730.24
5.4.40.0200.07730.26
5.4.30.0170.10330.46
5.4.20.0270.09030.23
5.4.10.0230.07330.23
5.4.00.0170.11029.70
5.3.290.0120.05526.45
5.3.280.0200.09728.23
5.3.270.0230.10028.07
5.3.260.0430.10028.21
5.3.250.0230.10728.24
5.3.240.0170.07728.22
5.3.230.0070.09028.04
5.3.220.0070.09028.04
5.3.210.0100.10728.02
5.3.200.0230.09728.09
5.3.190.0130.09028.07
5.3.180.0070.08328.18
5.3.170.0170.12028.21
5.3.160.0370.09327.87
5.3.150.0130.09028.20
5.3.140.0230.10328.08
5.3.130.0100.08328.16
5.3.120.0200.10727.86
5.3.110.0200.12028.16
5.3.100.0130.10327.88
5.3.90.0230.08327.62
5.3.80.0230.08027.58
5.3.70.0330.10027.40
5.3.60.0130.08327.44
5.3.50.0130.10727.48
5.3.40.0300.10327.60
5.3.30.0270.09727.45
5.3.20.0200.10727.25
5.3.10.0270.09327.40
5.3.00.0170.07727.04
5.2.170.0300.06023.83
5.2.160.0130.12023.82
5.2.150.0270.08323.81
5.2.140.0230.08023.82
5.2.130.0130.07023.79
5.2.120.0270.09323.76
5.2.110.0200.10723.89
5.2.100.0100.10723.89
5.2.90.0170.10323.86
5.2.80.0100.08023.93
5.2.70.0200.10023.79
5.2.60.0070.08323.81
5.2.50.0230.11023.59
5.2.40.0170.08723.60
5.2.30.0230.08323.73
5.2.20.0230.10323.86
5.2.10.0170.10023.84
5.2.00.0100.04010.69
5.1.60.0100.0309.76
5.1.50.0130.0339.93
5.1.40.0100.04310.02
5.1.30.0100.04310.41
5.1.20.0130.04710.56
5.1.10.0100.02710.02
5.1.00.0100.05010.08
5.0.50.0030.0408.73
5.0.40.0030.0378.31
5.0.30.0000.0478.11
5.0.20.0000.0378.25
5.0.10.0000.0308.14
5.0.00.0070.0638.12
4.4.90.0030.0206.96
4.4.80.0130.0206.96
4.4.70.0100.0136.96
4.4.60.0270.0276.96
4.4.50.0030.0236.96
4.4.40.0100.0436.96
4.4.30.0030.0206.96
4.4.20.0000.0236.96
4.4.10.0000.0336.96
4.4.00.0070.0276.96
4.3.110.0030.0236.96
4.3.100.0130.0306.96
4.3.90.0070.0206.96
4.3.80.0070.0336.96
4.3.70.0100.0236.96
4.3.60.0170.0136.96
4.3.50.0070.0176.96
4.3.40.0070.0376.96
4.3.30.0000.0236.96
4.3.20.0030.0276.96
4.3.10.0030.0206.96
4.3.00.0130.0207.10