3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sum = 0; $master = array(); $arrColors = array('R', 'B', 'G' ,'Y'); $arrNumbers = array('1', '2', '3', '4'); foreach($arrColors as $num) { foreach($arrNumbers as $color) { $temp = $color.' - '.$num; if ($num != $num) { $sum+= $num; } array_push($master, $temp); } } print_r($master); echo "\n"; print_r ("The sum is ".$sum);
based on 0JXYk

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.0030.00919.56
7.1.100.0000.00818.14
7.1.70.0040.00417.18
7.1.60.0110.01419.32
7.1.50.0070.01416.95
7.1.00.0100.06722.31
7.0.200.0030.00716.92
7.0.140.0100.06722.17
7.0.60.0100.07719.95
7.0.50.0030.04017.75
7.0.40.0100.08020.02
7.0.30.0270.08320.10
7.0.20.0270.07320.11
7.0.10.0030.09320.21
7.0.00.0130.05720.16
5.6.280.0000.07720.81
5.6.210.0130.08020.76
5.6.200.0000.07718.19
5.6.190.0070.04020.57
5.6.180.0400.07720.63
5.6.170.0270.07720.46
5.6.160.0100.08320.55
5.6.150.0170.07318.23
5.6.140.0000.04318.17
5.6.130.0130.07718.18
5.6.120.0000.08320.94
5.6.110.0070.07720.89
5.6.100.0130.06020.98
5.6.90.0100.05021.11
5.6.80.0170.06320.35
5.5.350.0200.07020.47
5.5.340.0030.04017.97
5.5.330.0100.03720.42
5.5.320.0370.05720.27
5.5.310.0200.04320.32
5.5.300.0100.07718.07
5.5.290.0070.05718.05
5.5.280.0030.04020.89
5.5.270.0130.08020.72
5.5.260.0030.04320.67
5.5.250.0070.03720.59
5.5.240.0170.05320.11
5.4.450.0770.03719.53
5.4.440.0270.04019.41
5.4.430.0430.04719.56
5.4.420.0670.00019.52
5.4.410.0630.00019.21
5.4.400.0630.00019.35
5.4.390.0630.00019.06
5.4.380.0670.00019.16
5.4.370.0630.00019.26
5.4.360.0600.00019.11
5.4.350.0670.00019.26
5.4.340.0670.00019.16
5.4.320.0070.03512.48
5.4.310.0080.03512.49
5.4.300.0070.03512.49
5.4.290.0060.03812.48
5.4.280.0070.03412.38
5.4.270.0060.03612.38
5.4.260.0070.03712.38
5.4.250.0060.03712.38
5.4.240.0020.04012.38
5.4.230.0040.03812.38
5.4.220.0070.04112.38
5.4.210.0050.03612.37
5.4.200.0090.03712.38
5.4.190.0050.03712.37
5.4.180.0050.03812.37
5.4.170.0060.03512.38
5.4.160.0060.03512.38
5.4.150.0050.03512.37
5.4.140.0040.03912.05
5.4.130.0030.03712.05
5.4.120.0070.04212.00
5.4.110.0070.03412.00
5.4.100.0040.03512.00
5.4.90.0080.04411.99
5.4.80.0060.04711.99
5.4.70.0040.03711.99
5.4.60.0040.03711.99
5.4.50.0040.03611.99
5.4.40.0090.03211.98
5.4.30.0090.03311.98
5.4.20.0040.03711.98
5.4.10.0080.03411.98
5.4.00.0060.03511.47
5.3.290.0090.04112.80
5.3.280.0040.03912.71
5.3.270.0080.03612.73
5.3.260.0040.04212.71
5.3.250.0040.04112.72
5.3.240.0050.03712.72
5.3.230.0050.03812.71
5.3.220.0060.04112.68
5.3.210.0090.03512.68
5.3.200.0070.03912.68
5.3.190.0030.04212.68
5.3.180.0040.04012.68
5.3.170.0030.03812.67
5.3.160.0070.03512.67
5.3.150.0040.03812.67
5.3.140.0060.04312.66
5.3.130.0060.04212.65
5.3.120.0100.03812.66
5.3.110.0100.04312.66
5.3.100.0050.04512.12
5.3.90.0060.04112.09
5.3.80.0080.03612.08
5.3.70.0070.03612.08
5.3.60.0050.03912.07
5.3.50.0050.04012.02
5.3.40.0070.03512.01
5.3.30.0060.04611.97
5.3.20.0090.03211.75
5.3.10.0070.04711.72
5.3.00.0070.03611.71
5.2.170.0060.0299.20
5.2.160.0030.0319.21
5.2.150.0050.0309.22
5.2.140.0080.0389.20
5.2.130.0040.0299.16
5.2.120.0060.0269.16
5.2.110.0050.0299.17
5.2.100.0060.0279.17
5.2.90.0030.0309.17
5.2.80.0080.0279.17
5.2.70.0040.0309.16
5.2.60.0040.0369.11
5.2.50.0060.0359.08
5.2.40.0040.0319.05
5.2.30.0070.0279.04
5.2.20.0070.0279.03
5.2.10.0060.0268.94
5.2.00.0050.0288.80
5.1.60.0060.0268.09
5.1.50.0080.0298.08
5.1.40.0050.0248.06
5.1.30.0020.0288.41
5.1.20.0070.0278.43
5.1.10.0050.0248.16
5.1.00.0060.0238.16
5.0.50.0040.0236.64
5.0.40.0030.0196.49
5.0.30.0060.0286.31
5.0.20.0030.0256.27
5.0.10.0030.0206.26
5.0.00.0030.0316.25
4.4.90.0030.0154.78
4.4.80.0030.0194.76
4.4.70.0020.0184.75
4.4.60.0060.0124.76
4.4.50.0030.0154.77
4.4.40.0010.0274.71
4.4.30.0030.0164.76
4.4.20.0060.0124.84
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0030.0154.67
4.3.100.0020.0184.66
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0040.0134.63
4.3.60.0040.0184.63
4.3.50.0020.0164.63
4.3.40.0030.0344.54
4.3.30.0020.0163.30
4.3.20.0010.0173.29
4.3.10.0030.0153.25
4.3.00.0100.01313.59