3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array( "one" => 1, "two" => 2, "three" => 3, "seventeen" => 17 ); foreach ($a as $k => $v) { echo "$k => $v.\n"; }

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.0190.00319.05
7.1.200.0120.00315.85
7.1.100.0040.01218.29
7.1.70.0000.01016.82
7.1.60.0040.01219.46
7.1.50.0070.01416.97
7.1.00.0000.07722.28
7.0.200.0030.00616.91
7.0.140.0070.07322.18
7.0.60.0100.05019.92
7.0.50.0100.03317.80
7.0.40.0270.06020.30
7.0.30.0400.06020.08
7.0.20.0100.04720.00
7.0.10.0070.08720.17
7.0.00.0100.08020.19
5.6.280.0070.07021.10
5.6.210.0100.07320.64
5.6.200.0030.06018.19
5.6.190.0000.06020.49
5.6.180.0330.05720.35
5.6.170.0230.05720.45
5.6.160.0270.07020.50
5.6.150.0070.03318.12
5.6.140.0000.07018.20
5.6.130.0070.07718.15
5.6.120.0030.09020.99
5.6.110.0130.04721.00
5.6.100.0070.05020.98
5.6.90.0030.05320.86
5.6.80.0170.07020.39
5.5.350.3870.03320.39
5.5.340.0100.08018.02
5.5.330.0000.04320.23
5.5.320.0270.03720.30
5.5.310.0330.05720.29
5.5.300.0000.08318.00
5.5.290.0100.08018.00
5.5.280.0100.06720.73
5.5.270.0030.04320.88
5.5.260.0030.06320.86
5.5.250.0100.07720.58
5.5.240.0070.08020.18
5.4.450.0570.03351.49
5.4.440.0370.04043.79
5.4.430.0200.05038.68
5.4.420.0270.03737.55
5.4.410.0230.04035.18
5.4.400.0600.02031.64
5.4.390.0170.04731.61
5.4.380.0670.06718.77
5.4.370.0370.04718.65
5.4.360.0370.06718.77
5.4.350.0330.05018.58
5.4.340.0470.05018.58
5.4.320.0050.03712.46
5.4.310.0050.04012.45
5.4.300.0060.04312.45
5.4.290.0110.04512.45
5.4.280.0040.03712.35
5.4.270.0060.03812.35
5.4.260.0090.03812.35
5.4.250.0070.03812.35
5.4.240.0060.03812.35
5.4.230.0070.04512.34
5.4.220.0090.05412.34
5.4.210.0050.05412.34
5.4.200.0070.05312.34
5.4.190.0070.05712.34
5.4.180.0080.05612.34
5.4.170.0100.05012.35
5.4.160.0050.05212.35
5.4.150.0090.04812.34
5.4.140.0060.05312.02
5.4.130.0070.05012.01
5.4.120.0090.05011.97
5.4.110.0040.05411.96
5.4.100.0070.04811.97
5.4.90.0060.04611.96
5.4.80.0050.04011.96
5.4.70.0090.04411.96
5.4.60.0080.03611.96
5.4.50.0070.03711.96
5.4.40.0120.03411.95
5.4.30.0070.03711.95
5.4.20.0100.03511.95
5.4.10.0110.03511.95
5.4.00.0080.03811.43
5.3.290.0070.03912.80
5.3.280.0090.05012.71
5.3.270.0100.04412.73
5.3.260.0090.04412.71
5.3.250.0060.04112.72
5.3.240.0060.03812.72
5.3.230.0080.04812.71
5.3.220.0140.04612.68
5.3.210.0120.04812.68
5.3.200.0070.05112.68
5.3.190.0130.04512.68
5.3.180.0100.04312.67
5.3.170.0050.04112.67
5.3.160.0080.04112.67
5.3.150.0070.03812.68
5.3.140.0060.03812.66
5.3.130.0060.05212.66
5.3.120.0090.03812.66
5.3.110.0100.05212.66
5.3.100.0140.04412.12
5.3.90.0110.04912.08
5.3.80.0160.04312.07
5.3.70.0200.05512.08
5.3.60.0070.05312.06
5.3.50.0140.04612.00
5.3.40.0080.05112.00
5.3.30.0080.05011.95
5.3.20.0090.04811.72
5.3.10.0040.05311.69
5.3.00.0060.05311.68
5.2.170.0050.0449.18
5.2.160.0050.0439.18
5.2.150.0140.0379.17
5.2.140.0090.0439.17
5.2.130.0060.0449.14
5.2.120.0090.0629.13
5.2.110.0060.0469.14
5.2.100.0040.0469.14
5.2.90.0090.0439.14
5.2.80.0130.0429.14
5.2.70.0120.0399.13
5.2.60.0300.0829.09
5.2.50.0110.0409.06
5.2.40.0090.0399.03
5.2.30.0070.0439.00
5.2.20.0060.0419.00
5.2.10.0080.0418.94
5.2.00.0080.0428.79
5.1.60.0080.0368.07
5.1.50.0090.0338.07
5.1.40.0100.0368.05
5.1.30.0070.0408.41
5.1.20.0050.0458.43
5.1.10.0110.0378.15
5.1.00.0080.0388.15
5.0.50.0090.0286.63
5.0.40.0090.0386.49
5.0.30.0080.0496.30
5.0.20.0050.0306.27
5.0.10.0000.0366.25
5.0.00.0070.0416.24
4.4.90.0050.0234.78
4.4.80.0050.0264.75
4.4.70.0060.0224.76
4.4.60.0040.0294.75
4.4.50.0040.0264.77
4.4.40.0080.0364.71
4.4.30.0050.0244.76
4.4.20.0040.0204.85
4.4.10.0040.0214.85
4.4.00.0020.0334.76
4.3.110.0030.0224.67
4.3.100.0030.0214.66
4.3.90.0070.0224.63
4.3.80.0050.0354.59
4.3.70.0030.0244.63
4.3.60.0040.0234.62
4.3.50.0050.0244.63
4.3.40.0050.0364.54
4.3.30.0040.0233.30
4.3.20.0050.0223.27
4.3.10.0020.0223.23
4.3.00.0030.01729.18