3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = '{"Saturday" : { "00-06" : "Non-stop", "19-22" : "Saturday Night Club Mix" }, "Sunday" : { "00-04" : "Party cool down", "04-24" : "Non-stop" }}'; //$days[] = json_decode($array, TRUE); /*foreach($days as $day=>$time) { echo '<div class="day">'; echo '<h2>' . $day . '</h2>'; echo '<ul>'; foreach($time as $timee=>$item) { echo '<li>'; echo '<span class="time">' . $timee . '</span>&nbsp;'; echo $item; echo '</li>'; } echo '</ul>'; echo '</div>'; }*/ $jsonIterator = new RecursiveIteratorIterator( new RecursiveArrayIterator(json_decode($array, TRUE)), RecursiveIteratorIterator::SELF_FIRST); foreach ($jsonIterator as $key => $val) { if(is_array($val)) { echo "$key:\n"; } else { echo "$key => $val\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.3.0rc40.0190.00698.97
7.3.0rc30.0140.00716.46
7.3.0beta10.0040.00712.65
7.3.0alpha10.0110.00412.57
7.2.80.0000.00816.62
7.2.60.0030.01017.03
7.2.00.0040.00819.43
7.1.200.0070.00715.76
7.1.100.0000.01418.01
7.1.70.0000.01017.05
7.1.60.0170.00719.32
7.1.50.0000.02216.89
7.1.00.0000.03722.41
7.0.200.0040.00416.52
7.0.140.0030.06722.01
7.0.100.0170.04319.93
7.0.90.0100.04320.02
7.0.80.0230.04019.86
7.0.70.0130.04719.89
7.0.60.0200.04019.89
7.0.50.0230.03720.36
7.0.40.0100.06720.14
7.0.30.0100.08020.04
7.0.20.0100.06719.95
7.0.10.0170.07019.99
7.0.00.0000.05020.14
5.6.280.0070.07020.99
5.6.250.0030.04020.75
5.6.240.0030.04020.75
5.6.230.0030.06020.50
5.6.220.0030.04020.59
5.6.210.0000.04320.61
5.6.200.0000.07020.96
5.6.190.0070.06320.96
5.6.180.0030.08021.06
5.6.170.0170.07721.08
5.6.160.0070.07721.05
5.6.150.0030.08721.14
5.6.140.0070.08020.93
5.6.130.0200.06721.08
5.6.120.0070.04020.96
5.6.110.0070.04021.01
5.6.100.0070.05321.12
5.6.90.0100.07321.07
5.6.80.0070.08020.43
5.6.70.0130.07020.40
5.6.60.0070.06720.30
5.6.50.0030.04020.49
5.6.40.0070.06020.40
5.6.30.0030.08020.37
5.6.20.0000.08720.43
5.6.10.0030.03720.44
5.6.00.0000.07020.47
5.5.380.0030.04320.45
5.5.370.0000.04320.35
5.5.360.0100.03720.40
5.5.350.0100.03720.30
5.5.340.0070.07720.90
5.5.330.0070.06720.92
5.5.320.0000.05720.84
5.5.310.0130.07020.76
5.5.300.0030.07720.89
5.5.290.0100.08020.88
5.5.280.0070.04320.83
5.5.270.0130.07320.88
5.5.260.0030.08720.80
5.5.250.0100.07320.44
5.5.240.0130.06720.21
5.5.230.0100.07320.15
5.5.220.0100.03020.15
5.5.210.0170.07320.21
5.5.200.0070.07320.28
5.5.190.0070.05720.18
5.5.180.0130.07320.22
5.5.160.0100.03720.08
5.5.150.0000.06720.07
5.5.140.0070.06720.27
5.5.130.0000.04320.12
5.5.120.0070.05020.20
5.5.110.0170.06320.07
5.5.100.0030.08320.16
5.5.90.0130.07020.18
5.5.80.0130.07019.94
5.5.70.0070.05719.96
5.5.60.0070.07319.93
5.5.50.0100.06720.05
5.5.40.0130.02720.15
5.5.30.0070.08020.15
5.5.20.0170.06320.13
5.5.10.0070.07320.09
5.5.00.0070.08020.03
5.4.450.0070.07319.45
5.4.440.0000.08019.36
5.4.430.0100.06719.47
5.4.420.0070.04719.55
5.4.410.0070.07719.23
5.4.400.0030.06719.13
5.4.390.0000.07319.10
5.4.380.0030.07318.89
5.4.370.0070.07018.79
5.4.360.0000.08019.03
5.4.350.0070.07018.96
5.4.340.0030.08018.97
5.4.320.0000.06318.79
5.4.310.0070.05719.05
5.4.300.0100.06318.81
5.4.290.0000.07019.03
5.4.280.0100.07019.00
5.4.270.0000.04318.79
5.4.260.0070.04018.78
5.4.250.0070.08019.09
5.4.240.0100.06719.12
5.4.230.0070.07719.04
5.4.220.0100.05018.78
5.4.210.0000.04319.04
5.4.200.0030.07718.97
5.4.190.0100.07718.89
5.4.180.0070.07319.02
5.4.170.0000.04019.02
5.4.160.0100.06019.04
5.4.150.0070.07719.10
5.4.140.0030.06316.26
5.4.130.0070.07016.29
5.4.120.0030.07316.28
5.4.110.0030.07316.44
5.4.100.0100.06316.44
5.4.90.0100.06716.44
5.4.80.0030.07316.36
5.4.70.0030.08016.41
5.4.60.0000.07016.21
5.4.50.0030.06716.31
5.4.40.0070.07316.36
5.4.30.0000.08316.31
5.4.20.0100.06716.18
5.4.10.0000.05016.18
5.4.00.0030.07715.50
5.3.290.0070.07714.66
5.3.280.0000.04014.46
5.3.270.0030.04314.46
5.3.260.0070.07014.56
5.3.250.0100.06714.44
5.3.240.0000.05014.55
5.3.230.0030.07014.46
5.3.220.0030.07314.55
5.3.210.0030.07714.55
5.3.200.0000.06714.58
5.3.190.0100.06714.54
5.3.180.0030.07014.58
5.3.170.0030.06714.41
5.3.160.0070.07714.56
5.3.150.0030.04014.48
5.3.140.0070.08014.57
5.3.130.0170.06314.47
5.3.120.0000.04314.56
5.3.110.0070.06014.40
5.3.100.0070.06013.91
5.3.90.0170.06314.00
5.3.80.0070.06313.98
5.3.70.0200.04713.79
5.3.60.0030.06713.87
5.3.50.0130.06013.80
5.3.40.0070.07313.89
5.3.30.0070.07013.91
5.3.20.0030.07713.69
5.3.10.0030.07013.61
5.3.00.0070.07713.64
5.2.170.0030.06311.21
5.2.160.0100.05311.09
5.2.150.0000.07011.01
5.2.140.0100.05711.10
5.2.130.0070.06310.97
5.2.120.0100.03711.13
5.2.110.0030.06011.16
5.2.100.0000.03711.05
5.2.90.0030.05711.11
5.2.80.0070.03311.05
5.2.70.0030.06011.14
5.2.60.0070.05711.05
5.2.50.0130.05010.98
5.2.40.0030.05711.02
5.2.30.0030.05310.98
5.2.20.0030.05710.96
5.2.10.0100.05710.91
5.2.00.0030.05310.76
5.1.60.0070.05310.01
5.1.50.0070.0539.98
5.1.40.0070.04710.08
5.1.30.0030.05310.39
5.1.20.0000.04010.36
5.1.10.0000.0609.91
5.1.00.0000.03710.07
5.0.50.0070.0378.57
5.0.40.0030.0408.47
5.0.30.0070.0578.21
5.0.20.0030.0408.03
5.0.10.0070.0278.25
5.0.00.0030.0608.16
4.4.90.0000.0307.79
4.4.80.0030.0237.79
4.4.70.0030.0377.79
4.4.60.0000.0237.79
4.4.50.0030.0377.79
4.4.40.0000.0577.79
4.4.30.0000.0377.79
4.4.20.0000.0377.79
4.4.10.0000.0377.79
4.4.00.0000.0337.79
4.3.110.0070.0307.79
4.3.100.0000.0407.79
4.3.90.0030.0337.79
4.3.80.0100.0477.79
4.3.70.0070.0307.79
4.3.60.0030.0337.79
4.3.50.0070.0277.79
4.3.40.0070.0277.79
4.3.30.0000.0307.79
4.3.20.0000.0377.79
4.3.10.0000.0377.79
4.3.00.0070.0307.79