3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(1,1,2,3,4,4,5,6,7,7,8,9,9); $newArray = array(); foreach($array as $key => $value) { if($array[$key] == $array[$key--]) { continue; } else { $newArray[$key] = $value; } echo $value . '<br>'; } print_r($newArray);

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.0060.00616.78
7.2.00.0070.00719.56
7.1.200.0090.00615.76
7.1.100.0000.01118.06
7.1.70.0000.00717.09
7.1.60.0000.01519.86
7.1.50.0150.00616.96
7.1.00.0030.07722.44
7.0.200.0440.00714.80
7.0.60.0130.07720.05
7.0.50.0070.03717.91
7.0.40.0000.08320.06
7.0.30.0070.08020.18
7.0.20.0370.07320.01
7.0.10.0070.04320.17
7.0.00.0000.04720.30
5.6.280.0030.07020.88
5.6.210.0070.06020.51
5.6.200.0030.07718.12
5.6.190.0200.07020.28
5.6.180.0030.04320.39
5.6.170.0230.04020.33
5.6.160.0030.07720.71
5.6.150.0070.08318.11
5.6.140.0030.08718.16
5.6.130.0030.04318.22
5.6.120.0170.07320.99
5.6.110.0070.07321.08
5.6.100.0130.04021.00
5.6.90.0130.07021.10
5.6.80.0130.07320.42
5.5.350.4130.04720.32
5.5.340.0070.07718.01
5.5.330.0000.04320.23
5.5.320.0400.06720.18
5.5.310.0300.05020.50
5.5.300.0070.04017.98
5.5.290.0070.08318.03
5.5.280.0070.04020.80
5.5.270.0070.05020.86
5.5.260.0030.08020.76
5.5.250.0200.06320.61
5.5.240.0170.03720.25
5.4.450.0200.07319.18
5.4.440.0270.03719.11
5.4.430.0270.04319.57
5.4.420.0230.03719.45
5.4.410.0470.05319.29
5.4.400.0300.06718.96
5.4.390.0330.04319.10
5.4.380.0230.04019.13
5.4.370.0370.06719.25
5.4.360.0430.06318.89
5.4.350.0470.05019.13
5.4.340.0430.05018.80
5.4.320.0370.06319.05
5.4.310.0270.05018.80
5.4.300.0330.05319.08
5.4.290.0430.06719.23
5.4.280.0470.05718.91
5.4.270.0370.04319.08
5.4.260.0370.04018.77
5.4.250.0370.07318.88
5.4.240.0270.04719.20
5.4.230.0430.06019.08
5.4.220.0300.05719.24
5.4.210.0230.04319.12
5.4.200.0400.06018.91
5.4.190.0300.05719.08
5.4.180.0470.05718.87
5.4.170.0200.04719.07
5.4.160.0200.04318.79
5.4.150.0270.03719.06
5.4.140.0430.05016.23
5.4.130.0300.05016.42
5.4.120.0300.03716.32
5.4.110.0300.03716.49
5.4.100.0370.06316.50
5.4.90.0470.05716.07
5.4.80.0300.07316.26
5.4.70.0370.04316.38
5.4.60.0400.06016.20
5.4.50.0330.06316.20
5.4.40.0400.06016.43
5.4.30.0370.06316.36
5.4.20.0300.05316.20
5.4.10.0370.06316.36
5.4.00.0330.03315.76
5.3.290.0400.06714.50
5.3.280.0300.06014.45
5.3.270.0370.07014.55
5.3.260.0270.05714.46
5.3.250.0430.03314.70
5.3.240.0300.05014.62
5.3.230.0270.03714.64
5.3.220.0230.03714.41
5.3.210.0300.07314.51
5.3.200.0330.05014.66
5.3.190.0330.06714.44
5.3.180.0330.05714.40
5.3.170.0270.05314.52
5.3.160.0330.06014.47
5.3.150.0330.07314.65
5.3.140.0400.06714.43
5.3.130.0430.04314.48
5.3.120.0400.06314.49
5.3.110.0300.06714.40
5.3.100.0370.06014.01
5.3.90.0230.05713.97
5.3.80.0400.06013.89
5.3.70.0470.05313.79
5.3.60.0370.06013.95
5.3.50.0330.05713.72
5.3.40.0530.05013.90
5.3.30.0330.05013.75
5.3.20.0300.04313.47
5.3.10.0270.06013.56
5.3.00.0230.04313.58
5.2.170.0300.02712.46
5.2.160.0230.05012.46
5.2.150.0170.03012.46
5.2.140.0230.04012.46
5.2.130.0270.05312.46
5.2.120.0170.04012.46
5.2.110.0300.05312.46
5.2.100.0370.04312.46
5.2.90.0230.05312.46
5.2.80.0200.02712.46
5.2.70.0230.05712.46
5.2.60.0300.04712.46
5.2.50.0200.02712.46
5.2.40.0170.02712.46
5.2.30.0200.05012.46
5.2.20.0200.03312.46
5.2.10.0170.03312.46
5.2.00.0200.06012.46
5.1.60.0170.03012.46
5.1.50.0200.05012.46
5.1.40.0170.04712.46
5.1.30.0230.05312.46
5.1.20.0170.03012.46
5.1.10.0300.04012.46
5.1.00.0230.03312.46
5.0.50.0170.04312.46
5.0.40.0130.04312.46
5.0.30.0170.05012.46
5.0.20.0130.02312.46
5.0.10.0130.04012.46
5.0.00.0070.03312.46
4.4.90.0130.02312.46
4.4.80.0030.02012.46
4.4.70.0100.02712.46
4.4.60.0130.01712.46
4.4.50.0100.01712.46
4.4.40.0200.02712.46
4.4.30.0130.01312.46
4.4.20.0100.03712.46
4.4.10.0100.01712.46
4.4.00.0100.04712.46
4.3.110.0100.03012.46
4.3.100.0170.02712.46
4.3.90.0100.01712.46
4.3.80.0070.03312.46
4.3.70.0070.01712.46
4.3.60.0100.01312.46
4.3.50.0070.01712.46
4.3.40.0070.02712.46
4.3.30.0030.02312.46
4.3.20.0130.02712.46
4.3.10.0070.01312.46
4.3.00.0030.02712.46