3v4l.org

run code in 200+ php & hhvm versions
<?php $array = []; // make some array for testing for($i=0; $i < 100; $i++) $array["key$i"] = $i; for($i=0; $i < 1000000; $i++) { foreach ($array as $firstKey => $value) { break; } }
based on WRAdn

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.60.0070.03716.97
7.2.00.0050.05719.57
7.1.200.0030.04115.84
7.1.120.0100.05518.36
7.1.110.0040.05418.26
7.1.100.0070.05118.23
7.1.90.0100.04818.25
7.1.80.0000.05818.22
7.1.70.0060.03917.20
7.1.60.0120.04426.28
7.1.50.0100.06826.01
7.1.40.0150.05725.47
7.1.30.0130.06225.54
7.1.20.0140.05725.69
7.1.10.0060.03816.49
7.1.00.0020.04516.80
7.0.260.0100.04618.36
7.0.250.0030.05517.79
7.0.240.0100.04817.88
7.0.230.0000.05717.92
7.0.220.0030.06917.59
7.0.210.0070.04916.55
7.0.200.0070.04116.81
7.0.190.0030.05016.72
7.0.180.0080.05616.38
7.0.170.0030.05116.36
7.0.160.0110.04916.34
7.0.150.0030.04316.35
7.0.140.0030.04516.33
7.0.130.0120.04716.59
7.0.120.0080.04116.47
7.0.110.0020.05016.10
7.0.100.0030.04316.37
7.0.90.0050.05016.29
7.0.80.0060.03816.29
7.0.70.0060.04816.37
7.0.60.0070.04115.94
7.0.50.0020.05116.36
7.0.40.0070.04115.55
7.0.30.0050.04915.50
7.0.20.0030.04415.62
7.0.10.0050.03915.60
7.0.00.0020.04615.50
hhvm-3.22.00.0600.26191.08
hhvm-3.21.30.0570.24990.41
hhvm-3.21.00.0710.27890.66
hhvm-3.20.20.0780.24690.21
hhvm-3.19.20.0600.27990.01
hhvm-3.18.50.0500.27288.34
hhvm-3.18.40.0760.29888.34
hhvm-3.17.30.0450.21895.35
hhvm-3.15.40.0360.23293.29
hhvm-3.13.20.0530.235103.03
hhvm-3.12.140.0650.245105.05
hhvm-3.11.10.0510.26397.27
hhvm-3.10.10.0430.22594.09
5.6.300.0120.16220.84
5.6.290.0070.16820.83
5.6.280.0120.18320.93
5.6.270.0080.16720.82
5.6.260.0130.16420.89
5.6.250.0070.19820.79
5.6.240.0100.16220.84
5.6.230.0120.17820.94
5.6.220.0050.18420.86
5.6.210.0050.19520.73
5.6.200.0080.18920.96
5.6.190.0070.17420.85
5.6.180.0030.16820.85
5.6.170.0080.18220.87
5.6.160.0080.19520.85
5.6.150.0130.15520.84
5.6.140.0100.15720.84
5.6.130.0100.16920.81
5.6.120.0030.18820.98
5.6.110.0100.18220.86
5.6.100.0050.16920.88
5.6.90.0050.16520.69
5.6.80.0120.15120.20
5.6.70.0050.16520.11
5.6.60.0100.15320.36
5.6.50.0070.17520.25
5.6.40.0070.16620.14
5.6.30.0080.20620.13
5.6.20.0050.18920.22
5.6.10.0110.16820.31
5.6.00.0120.19620.31
5.5.380.0130.18517.49
5.5.370.0070.17517.47
5.5.360.0100.19117.50
5.5.350.0050.19017.46
5.5.340.0070.19217.88
5.5.330.0050.19618.06
5.5.320.0050.17017.84
5.5.310.0130.15717.88
5.5.300.0110.16317.93
5.5.290.0080.17117.95
5.5.280.0070.15517.84
5.5.270.0050.19218.04
5.5.260.0070.17617.86
5.5.250.0070.17517.82
5.5.240.0050.15817.14
5.5.230.0120.15417.18
5.5.220.0070.16517.39
5.5.210.0030.16117.27
5.5.200.0030.16317.31
5.5.190.0130.21617.27
5.5.180.0080.18317.29
5.5.160.0100.19117.28
5.5.150.0050.17717.25
5.5.140.0100.15617.25
5.5.130.0120.17017.18
5.5.120.0070.16417.31
5.5.110.0070.18017.34
5.5.100.0020.16416.97
5.5.90.0070.16517.22
5.5.80.0230.18817.10
5.5.70.0100.16817.20
5.5.60.0100.17817.24
5.5.50.0050.16717.21
5.5.40.0050.20117.15
5.5.30.0030.18117.05
5.5.20.0050.20217.27
5.5.10.0080.15917.24
5.5.00.0030.16917.15
5.4.450.0080.16219.29
5.4.440.0070.19419.27
5.4.430.0060.16419.25
5.4.420.0130.16919.40
5.4.410.0120.15919.27
5.4.400.0130.16019.15
5.4.390.0100.17419.00
5.4.380.0080.18718.93
5.4.370.0070.17819.00
5.4.360.0120.20918.93
5.4.350.0130.20219.05
5.4.340.0050.18118.99
5.4.320.0100.16518.96
5.4.310.0320.20319.07
5.4.300.0030.16919.00
5.4.290.0080.18018.94
5.4.280.0080.16519.07
5.4.270.0140.17218.95
5.4.260.0070.17318.93
5.4.250.0100.20118.96
5.4.240.0070.17319.03
5.4.230.0400.19718.95
5.4.220.0050.16919.06
5.4.210.0150.17018.91
5.4.200.0310.16818.94
5.4.190.0080.18519.03
5.4.180.0080.17619.01
5.4.170.0070.18019.01
5.4.160.0070.18318.99
5.4.150.0020.17518.91
5.4.140.0070.17616.38
5.4.130.0070.15916.30
5.4.120.0100.17216.57
5.4.110.0080.17716.40
5.4.100.0070.17716.57
5.4.90.0050.17616.53
5.4.80.0030.18816.38
5.4.70.0060.17016.48
5.4.60.0080.17316.61
5.4.50.0080.16916.44
5.4.40.0080.18816.51
5.4.30.0070.16116.43
5.4.20.0050.16416.38
5.4.10.0120.16416.55
5.4.00.0050.17415.98
5.3.290.0100.07014.64
5.3.280.0050.05114.63
5.3.270.0130.04014.70
5.3.260.0060.05014.73
5.3.250.0030.04714.65
5.3.240.0150.03914.64
5.3.230.0100.04214.69
5.3.220.0110.04814.65
5.3.210.0150.05014.53
5.3.200.0100.04414.62
5.3.190.0050.04614.71
5.3.180.0070.04514.69
5.3.170.0030.04914.70
5.3.160.0080.04214.62
5.3.150.0070.05314.71
5.3.140.0060.04214.68
5.3.130.0050.04614.64
5.3.120.0020.05114.64
5.3.110.0030.04714.62
5.3.100.0070.05314.33
5.3.90.0060.04314.32
5.3.80.0070.04514.43
5.3.70.0030.04514.46
5.3.60.0070.04014.41
5.3.50.0100.03814.36
5.3.40.0080.04014.42
5.3.30.0060.04214.33
5.3.20.0050.04614.19
5.3.10.0080.03814.17
5.3.00.0050.04414.20
5.2.170.0070.03712.94
5.2.160.0090.03112.98
5.2.150.0050.03613.04
5.2.140.0070.03512.99
5.2.130.0050.04312.96
5.2.120.0060.03312.87
5.2.110.0080.03112.96
5.2.100.0030.03612.99
5.2.90.0070.03113.00
5.2.80.0080.03112.92
5.2.70.0120.03413.00
5.2.60.0050.04212.95
5.2.50.0030.03712.98
5.2.40.0090.03612.88
5.2.30.0090.03612.89
5.2.20.0060.03912.88
5.2.10.0110.02712.87
5.2.00.0060.03612.80
5.1.60.0050.03412.37
5.1.50.0070.02712.37
5.1.40.0030.02912.43
5.1.30.0050.03012.44
5.1.20.0020.03412.46
5.1.10.0080.03012.54
5.1.00.0080.02612.37
5.0.50.0030.02611.96
5.0.40.0070.02211.96
5.0.30.0030.03611.96
5.0.20.0030.02211.96
5.0.10.0030.02411.96
5.0.00.0050.03311.96
4.4.90.0030.01811.96
4.4.80.0050.01911.96
4.4.70.0020.02311.96
4.4.60.0020.02211.96
4.4.50.0030.01811.96
4.4.40.0030.02911.96
4.4.30.0020.02011.96
4.4.20.0030.02111.96
4.4.10.0000.02411.96
4.4.00.0050.02811.96
4.3.110.0000.02111.96
4.3.100.0030.01611.96
4.3.90.0030.01711.96
4.3.80.0020.02911.96
4.3.70.0050.01511.96
4.3.60.0030.01711.96
4.3.50.0030.02211.96
4.3.40.0030.02711.96
4.3.30.0030.01811.96
4.3.20.0030.01711.96
4.3.10.0020.01911.96
4.3.00.0020.01811.96