3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array('1', '2', '3'); foreach ($arr as $key=>&$val) { if (count($arr)<4) array_push($arr, '999'); echo $val."\n"; }

Here you find the average performance (time & memory) of each version. A greyed 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.0060.00619.46
7.1.100.0030.01017.93
7.1.70.0060.00916.90
7.1.60.0040.01919.33
7.1.50.0060.00616.87
7.1.00.0000.08022.27
7.0.200.0030.00616.50
7.0.140.0070.06722.09
7.0.60.0070.04319.84
7.0.50.0000.05717.88
7.0.40.0070.08720.30
7.0.30.0400.05320.21
7.0.20.0200.03720.19
7.0.10.0230.07020.00
7.0.00.0030.06720.04
5.6.280.0070.07020.93
5.6.210.0000.04720.69
5.6.200.0070.07018.19
5.6.190.0100.08720.58
5.6.180.0270.05020.60
5.6.170.0230.07020.45
5.6.160.0070.04020.54
5.6.150.0100.03318.07
5.6.140.0100.07718.20
5.6.130.0030.04018.12
5.6.120.0170.05021.12
5.6.110.0030.08721.13
5.6.100.0030.08320.96
5.6.90.0030.05020.94
5.6.80.0030.03720.28
5.6.70.4470.04020.32
5.5.350.0130.07020.41
5.5.340.0030.08717.97
5.5.330.0070.05720.18
5.5.320.0030.06020.30
5.5.310.0230.04720.28
5.5.300.0030.03717.97
5.5.290.0030.04017.91
5.5.280.0030.05020.88
5.5.270.0100.08020.61
5.5.260.0130.07020.76
5.5.250.0000.09020.66
5.5.240.0170.06020.13
5.4.450.0730.05319.45
5.4.440.0670.06719.32
5.4.430.0630.07319.45
5.4.420.0870.06719.43
5.4.410.0630.05719.16
5.4.400.0670.05719.09
5.4.390.0830.05319.14
5.4.380.0230.05318.49
5.4.370.0300.05018.54
5.4.360.0230.07318.53
5.4.350.0300.04718.74
5.4.340.0330.04018.72
5.4.320.0050.04712.46
5.4.310.0080.03712.46
5.4.300.0040.04112.46
5.4.290.0090.03812.45
5.4.280.0160.04212.32
5.4.270.0150.05212.32
5.4.260.0060.04012.32
5.4.250.0090.03612.32
5.4.240.0070.03912.32
5.4.230.0060.04512.32
5.4.220.0030.04012.31
5.4.210.0060.03612.31
5.4.200.0070.03712.32
5.4.190.0070.03612.31
5.4.180.0090.03412.31
5.4.170.0080.03912.32
5.4.160.0080.04212.32
5.4.150.0070.03612.31
5.4.140.0080.03712.00
5.4.130.0070.04611.98
5.4.120.0080.03411.95
5.4.110.0080.03411.94
5.4.100.0080.03611.94
5.4.90.0100.03811.94
5.4.80.0090.03411.94
5.4.70.0060.03611.93
5.4.60.0110.03811.94
5.4.50.0110.05011.93
5.4.40.0090.03711.93
5.4.30.0070.03811.92
5.4.20.0110.03711.92
5.4.10.0040.04211.93
5.4.00.0070.05111.41
5.3.290.0070.04112.80
5.3.280.0060.05712.71
5.3.270.0080.05712.72
5.3.260.0100.05112.72
5.3.250.0070.04012.72
5.3.240.0040.04012.71
5.3.230.0050.04112.71
5.3.220.0100.05012.68
5.3.210.0110.04312.68
5.3.200.0090.03412.68
5.3.190.0050.03912.68
5.3.180.0090.03712.68
5.3.170.0070.04312.67
5.3.160.0090.03512.67
5.3.150.0110.04212.68
5.3.140.0080.05312.66
5.3.130.0120.04912.66
5.3.120.0130.04912.66
5.3.110.0070.03912.66
5.3.100.0070.03612.12
5.3.90.0090.04512.08
5.3.80.0050.03912.07
5.3.70.0080.05012.07
5.3.60.0070.03712.06
5.3.50.0070.03712.00
5.3.40.0090.03612.00
5.3.30.0080.03811.94
5.3.20.0080.03711.70
5.3.10.0070.03811.66
5.3.00.0090.03711.66
5.2.170.0120.0269.15
5.2.160.0090.0279.15
5.2.150.0050.0369.15
5.2.140.0080.0389.14
5.2.130.0050.0359.11
5.2.120.0090.0399.10
5.2.110.0150.0469.11
5.2.100.0120.0609.11
5.2.90.0080.0329.11
5.2.80.0110.0509.11
5.2.70.0090.0519.11
5.2.60.0070.0539.06
5.2.50.0060.0429.03
5.2.40.0050.0339.01
5.2.30.0090.0358.98
5.2.20.0080.0488.97
5.2.10.0070.0348.90
5.2.00.0070.0268.76
5.1.60.0070.0248.04
5.1.50.0070.0288.04
5.1.40.0070.0258.03
5.1.30.0050.0278.38
5.1.20.0060.0278.40
5.1.10.0040.0328.13
5.1.00.0080.0298.13
5.0.50.0080.0266.60
5.0.40.0030.0226.46
5.0.30.0050.0306.27
5.0.20.0030.0216.25
5.0.10.0040.0196.22
5.0.00.0040.0406.21
4.4.90.0070.0194.77
4.4.80.0010.0184.76
4.4.70.0020.0174.75
4.4.60.0040.0174.75
4.4.50.0040.0184.77
4.4.40.0030.0284.71
4.4.30.0070.0184.76
4.4.20.0030.0154.84
4.4.10.0030.0224.84
4.4.00.0040.0314.75
4.3.110.0030.0224.67
4.3.100.0030.0214.66
4.3.90.0070.0174.64
4.3.80.0050.0314.58
4.3.70.0020.0194.63
4.3.60.0030.0154.63
4.3.50.0050.0144.63
4.3.40.0030.0254.54
4.3.30.0040.0143.27
4.3.20.0030.0153.25
4.3.10.0020.0183.21
4.3.00.0330.02710.37