3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array['addition'] = array(24, 12, 6); $array['subtraction'] = array(4, 4, 4); $array['multiplication'] = array(128, 32, 8); $array['division'] = array(4, 4, 6); $dups = array(); foreach($array as $key => $value){ $dups[$key] = array_count_values($value); } $currentHighestValue = 0; foreach($dups as $type => $value){ foreach($value as $v){ if($v > $currentHighestValue){ $currentHighestValue = $v; $currentHighestType = $type; } } } print $currentHighestType;

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.25
7.1.100.0040.00718.21
7.1.70.0000.00816.89
7.1.60.0170.00719.46
7.1.50.0100.01016.98
7.1.00.0000.08022.28
7.0.200.0080.00816.68
7.0.140.0000.07721.97
7.0.60.0070.08019.93
7.0.50.0030.04317.89
7.0.40.0130.06320.06
7.0.30.0300.07720.09
7.0.20.0230.08020.00
7.0.10.0000.05720.09
7.0.00.0200.06720.04
5.6.280.0100.06720.92
5.6.210.0100.05320.47
5.6.200.0070.07318.12
5.6.190.0100.04020.37
5.6.180.0270.07020.45
5.6.170.0300.07020.71
5.6.160.0100.07320.35
5.6.150.0030.04318.13
5.6.140.0000.05318.07
5.6.130.0100.03318.20
5.6.120.0100.05320.98
5.6.110.0170.08021.09
5.6.100.0130.07721.02
5.6.90.0100.08320.96
5.6.80.0130.07320.42
5.5.350.0100.03720.40
5.5.340.0000.05018.01
5.5.330.0130.06720.15
5.5.320.0300.07320.29
5.5.310.0200.04320.28
5.5.300.0030.05718.00
5.5.290.0030.05717.92
5.5.280.0100.08020.98
5.5.270.0130.06020.61
5.5.260.0000.04720.86
5.5.250.0030.07320.61
5.5.240.0100.07720.35
5.4.450.0400.04329.18
5.4.440.0230.05025.55
5.4.430.0230.05022.00
5.4.420.0230.04021.40
5.4.410.0270.03719.84
5.4.400.0930.04319.14
5.4.390.0230.04318.77
5.4.380.0330.04718.63
5.4.370.0400.04718.44
5.4.360.0330.04718.72
5.4.350.0400.04718.56
5.4.340.0300.05718.49
5.4.320.0050.03712.46
5.4.310.0060.04712.45
5.4.300.0090.04812.46
5.4.290.0140.04712.45
5.4.280.0080.04912.35
5.4.270.0050.05112.35
5.4.260.0080.05112.35
5.4.250.0110.04812.35
5.4.240.0060.05212.35
5.4.230.0140.04612.34
5.4.220.0130.04412.34
5.4.210.0100.04612.34
5.4.200.0010.05812.34
5.4.190.0040.05212.34
5.4.180.0120.05512.34
5.4.170.0120.05312.35
5.4.160.0140.07512.35
5.4.150.0080.04312.34
5.4.140.0120.07712.02
5.4.130.0070.05012.02
5.4.120.0130.07411.97
5.4.110.0130.05011.97
5.4.100.0080.05311.97
5.4.90.0150.05511.97
5.4.80.0190.05411.97
5.4.70.0260.08111.96
5.4.60.0150.04911.96
5.4.50.0110.04711.96
5.4.40.0080.04911.95
5.4.30.0140.04611.95
5.4.20.0210.09611.95
5.4.10.0150.04911.95
5.4.00.0100.05511.45
5.3.290.0030.04412.80
5.3.280.0090.05612.71
5.3.270.0070.05012.73
5.3.260.0090.04112.72
5.3.250.0060.04512.72
5.3.240.0080.04812.72
5.3.230.0110.03912.71
5.3.220.0070.04112.68
5.3.210.0060.05512.68
5.3.200.0070.03812.68
5.3.190.0070.04512.68
5.3.180.0150.03312.68
5.3.170.0060.04312.67
5.3.160.0070.04312.67
5.3.150.0070.04212.68
5.3.140.0060.04312.66
5.3.130.0130.04112.66
5.3.120.0080.04312.65
5.3.110.0080.04612.65
5.3.100.0060.05912.12
5.3.90.0070.05512.09
5.3.80.0110.05112.08
5.3.70.0100.04012.07
5.3.60.0090.05212.06
5.3.50.0060.04112.00
5.3.40.0100.04312.00
5.3.30.0090.04911.95
5.3.20.0080.04411.74
5.3.10.0070.03411.70
5.3.00.0100.03411.68
5.2.170.0090.0299.18
5.2.160.0060.0289.18
5.2.150.0090.0479.18
5.2.140.0080.0389.18
5.2.130.0030.0359.14
5.2.120.0070.0289.14
5.2.110.0080.0279.15
5.2.100.0040.0309.15
5.2.90.0070.0309.14
5.2.80.0080.0429.14
5.2.70.0070.0319.14
5.2.60.0060.0359.09
5.2.50.0030.0349.07
5.2.40.0110.0329.04
5.2.30.0040.0339.02
5.2.20.0040.0329.00
5.2.10.0070.0308.92
5.2.00.0050.0328.79
5.1.60.0060.0258.07
5.1.50.0040.0278.07
5.1.40.0030.0288.05
5.1.30.0060.0288.40
5.1.20.0040.0298.42
5.1.10.0040.0288.14
5.1.00.0040.0318.14
5.0.50.0060.0336.63
5.0.40.0090.0266.49
5.0.30.0120.0606.30
5.0.20.0070.0226.27
5.0.10.0070.0216.25
5.0.00.0040.0346.24
4.4.90.0020.0194.78
4.4.80.0050.0164.76
4.4.70.0050.0174.75
4.4.60.0040.0214.75
4.4.50.0040.0214.77
4.4.40.0060.0314.71
4.4.30.0040.0204.76
4.4.20.0060.0204.85
4.4.10.0040.0224.85
4.4.00.0030.0294.75
4.3.110.0030.0184.67
4.3.100.0030.0184.66
4.3.90.0010.0184.63
4.3.80.0040.0274.59
4.3.70.0050.0204.63
4.3.60.0030.0224.63
4.3.50.0100.0194.63
4.3.40.0050.0324.54
4.3.30.0060.0383.30
4.3.20.0040.0293.27
4.3.10.0080.0403.23
4.3.00.0230.03314.66