3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php eval("$rawarray = " . "array('a', 'b', array(array('c'), 'd'), 'e', array('f'), 'g')"); $return = array(); $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($rawarray)); foreach ($iterator as $value) { $return[] = $value; } print_r($return);

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.0300.00598.97
7.3.0rc30.0210.00716.68
7.3.0beta10.0060.00512.68
7.3.0alpha10.0090.00012.62
7.2.60.0000.01516.76
7.2.00.0090.00919.36
7.1.200.0100.00315.53
7.1.100.0040.00717.89
7.1.70.0040.00417.13
7.1.60.0140.01119.46
7.1.50.0000.01417.05
7.1.00.0070.07022.36
7.0.200.0000.00816.89
7.0.140.0000.07322.11
7.0.60.0330.06719.87
7.0.50.0070.08317.88
7.0.40.0100.04020.02
7.0.30.0370.06720.21
7.0.20.0200.04020.09
7.0.10.0170.07320.08
7.0.00.0030.05020.22
5.6.280.0030.07321.07
5.6.210.0100.04020.75
5.6.200.0030.04718.22
5.6.190.0030.05020.41
5.6.180.0070.08020.50
5.6.170.0300.04020.45
5.6.160.0100.08020.50
5.6.150.0070.03718.16
5.6.140.0070.05318.29
5.6.130.0070.05718.29
5.6.120.0130.08021.03
5.6.110.0030.08721.00
5.6.100.0030.04321.08
5.6.90.0170.07021.00
5.6.80.0130.07320.28
5.5.350.0230.07020.43
5.5.340.0000.06018.05
5.5.330.0100.08720.21
5.5.320.0270.03720.51
5.5.310.0270.08320.32
5.5.300.0070.08018.01
5.5.290.0030.08717.96
5.5.280.0100.08020.77
5.5.270.0100.03720.89
5.5.260.0100.08720.79
5.5.250.0030.08320.59
5.5.240.0170.03320.18
5.4.450.0030.08019.48
5.4.440.0100.07319.41
5.4.430.0130.07719.17
5.4.420.0070.07319.39
5.4.410.0100.05319.42
5.4.400.0030.07319.16
5.4.390.0030.07319.16
5.4.380.0070.07718.87
5.4.370.0170.05719.08
5.4.360.0070.07018.86
5.4.350.0070.07319.07
5.4.340.0070.07019.15
5.4.320.0030.05719.08
5.4.310.0070.06719.25
5.4.300.0100.05718.85
5.4.290.0170.05319.06
5.4.280.0100.06319.26
5.4.270.0070.06018.99
5.4.260.0000.08018.85
5.4.250.0030.07719.19
5.4.240.0030.07318.93
5.4.230.0030.07019.06
5.4.220.0070.07718.88
5.4.210.0070.06719.07
5.4.200.0030.07018.99
5.4.190.0070.05019.12
5.4.180.0070.05318.97
5.4.170.0070.07019.08
5.4.160.0070.04319.29
5.4.150.0030.05719.22
5.4.140.0030.07016.32
5.4.130.0070.07016.41
5.4.120.0100.06316.48
5.4.110.0070.07316.61
5.4.100.0070.06716.52
5.4.90.0000.04716.28
5.4.80.0000.07316.52
5.4.70.0070.07316.43
5.4.60.0030.04316.33
5.4.50.0000.07316.49
5.4.40.0000.07716.42
5.4.30.0130.04016.32
5.4.20.0100.06316.52
5.4.10.0070.07316.42
5.4.00.0070.06315.94
5.3.290.0000.07014.78
5.3.280.0030.07314.57
5.3.270.0000.05714.61
5.3.260.0000.04714.53
5.3.250.0070.06714.53
5.3.240.0030.07314.60
5.3.230.0000.05314.76
5.3.220.0070.07014.65
5.3.210.0030.07314.57
5.3.200.0030.06714.57
5.3.190.0030.07014.79
5.3.180.0000.07714.64
5.3.170.0070.05714.64
5.3.160.0030.07714.47
5.3.150.0030.07714.79
5.3.140.0070.06014.57
5.3.130.0070.07714.57
5.3.120.0070.07014.43
5.3.110.0200.04014.47
5.3.100.0070.07013.94
5.3.90.0030.07014.10
5.3.80.0030.06714.10
5.3.70.0000.06314.04
5.3.60.0070.05714.02
5.3.50.0030.04713.97
5.3.40.0030.06314.04
5.3.30.0000.07314.01
5.3.20.0000.06713.60
5.3.10.0000.07713.57
5.3.00.0030.05713.55
5.2.170.0000.06312.60
5.2.160.0030.04312.60
5.2.150.0000.06012.60
5.2.140.0000.05712.60
5.2.130.0000.05012.60
5.2.120.0070.06012.60
5.2.110.0000.06012.60
5.2.100.0070.06012.60
5.2.90.0000.06012.60
5.2.80.0030.06312.60
5.2.70.0030.06312.60
5.2.60.0070.03312.60
5.2.50.0070.04312.60
5.2.40.0030.06012.60
5.2.30.0070.05712.60
5.2.20.0030.04312.60
5.2.10.0030.04312.60
5.2.00.0030.04712.60
5.1.60.0130.02712.60
5.1.50.0030.04312.60
5.1.40.0000.04712.60
5.1.30.0000.05712.60
5.1.20.0000.04712.60
5.1.10.0070.04012.60
5.1.00.0070.03012.60
5.0.50.0030.04712.60
5.0.40.0030.03712.60
5.0.30.0000.04712.60
5.0.20.0070.03712.60
5.0.10.0000.04312.60
5.0.00.0030.05312.60
4.4.90.0000.02312.60
4.4.80.0030.02312.60
4.4.70.0000.03312.60
4.4.60.0000.03712.60
4.4.50.0000.02712.60
4.4.40.0000.05712.60
4.4.30.0030.02012.60
4.4.20.0000.02712.60
4.4.10.0000.02012.60
4.4.00.0000.04312.60
4.3.110.0000.03712.60
4.3.100.0000.02312.60
4.3.90.0000.03712.60
4.3.80.0030.04012.60
4.3.70.0030.03012.60
4.3.60.0030.02712.60
4.3.50.0000.03312.60
4.3.40.0000.05012.60
4.3.30.0030.03712.60
4.3.20.0100.03012.60
4.3.10.0000.04012.60
4.3.00.0000.03712.60