3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = ['a' => 1, 'b' => ['c' => 3]]; function recursivelyCreateObjs(array $array) { $obj = new stdClass; foreach($array as $key => $value) { if(is_array($value)) { $obj->$key = recursivelyCreateObjs($value); } else { $obj->$key = $value; } } return $obj; } var_dump(recursivelyCreateObjs($array));

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.0000.01219.41
7.1.100.0000.01118.17
7.1.70.0000.00817.07
7.1.60.0070.01019.40
7.1.50.0130.00917.01
7.1.00.0030.06722.28
7.0.200.0030.00616.75
7.0.140.0070.07022.21
7.0.120.0000.03322.03
7.0.60.0070.08720.01
7.0.50.0170.04317.91
7.0.40.0100.03720.23
7.0.30.0230.08320.25
7.0.20.0300.07320.19
7.0.10.0100.04720.24
7.0.00.0070.08020.16
5.6.280.0070.07021.14
5.6.210.0030.05320.52
5.6.200.0030.08318.14
5.6.190.0070.05020.51
5.6.180.0270.06020.47
5.6.170.0230.06720.44
5.6.160.0200.03720.50
5.6.150.0130.07318.19
5.6.140.0430.05018.17
5.6.130.0130.06018.16
5.6.120.0070.05021.04
5.6.110.0070.04021.02
5.6.100.0070.07021.03
5.6.90.0100.07321.04
5.6.80.0030.08320.36
5.5.350.0470.06020.45
5.5.340.0130.07717.95
5.5.330.0100.05020.35
5.5.320.0230.04020.34
5.5.310.0300.05320.42
5.5.300.0070.07717.98
5.5.290.0030.08018.01
5.5.280.0030.04020.80
5.5.270.0130.06020.68
5.5.260.0100.07720.96
5.5.250.0030.06320.66
5.5.240.0030.07320.27
5.4.450.0100.07019.47
5.4.440.0070.04319.53
5.4.430.0030.05019.44
5.4.420.0030.04319.46
5.4.410.0000.06719.05
5.4.400.0070.06319.01
5.4.390.0000.06018.88
5.4.380.0000.04718.85
5.4.370.0070.04719.00
5.4.360.0130.06719.12
5.4.350.0100.07019.15
5.4.340.0070.04719.15
5.4.320.0070.05718.87
5.4.310.0100.07718.85
5.4.300.0030.04718.85
5.4.290.0130.06319.14
5.4.280.0070.04019.02
5.4.270.0130.07018.97
5.4.260.0030.07719.23
5.4.250.0030.05019.23
5.4.240.0030.04019.21
5.4.230.0030.04019.10
5.4.220.0100.07019.23
5.4.210.0070.04018.91
5.4.200.0000.07019.13
5.4.190.0030.04718.84
5.4.180.0070.07019.14
5.4.170.0100.07719.19
5.4.160.0100.07019.13
5.4.150.0130.05719.05
5.4.140.0030.07716.38
5.4.130.0100.06716.34
5.4.120.0030.04016.46
5.4.110.0070.07316.43
5.4.100.0000.05316.45
5.4.90.0070.04016.50
5.4.80.0070.07016.39
5.4.70.0030.07016.44
5.4.60.0100.07316.43
5.4.50.0000.04316.25
5.4.40.0070.06716.40
5.4.30.0130.06716.46
5.4.20.0100.07016.46
5.4.10.0070.07316.64
5.4.00.0030.04315.91
5.3.290.0030.07314.59
5.3.280.0030.04014.68
5.3.270.0070.06314.58
5.3.260.0130.07014.40
5.3.250.0070.07014.55
5.3.240.0170.05014.55
5.3.230.0130.06314.61
5.3.220.0000.04014.45
5.3.210.0070.06314.46
5.3.200.0100.07314.51
5.3.190.0030.08314.59
5.3.180.0030.05714.49
5.3.170.0030.07314.51
5.3.160.0070.05314.49
5.3.150.0030.08014.45
5.3.140.0070.04714.49
5.3.130.0000.08014.47
5.3.120.0070.04714.43
5.3.110.0130.07014.43
5.3.100.0000.04314.00
5.3.90.0070.06313.99
5.3.80.0030.03713.86
5.3.70.0070.07313.94
5.3.60.0170.04713.92
5.3.50.0130.06713.76
5.3.40.0030.06713.88
5.3.30.0100.05714.00
5.3.20.0000.04313.57
5.3.10.0200.05013.75
5.3.00.0130.06313.56
5.2.170.0170.05711.02
5.2.160.0030.05711.23
5.2.150.0070.06310.96
5.2.140.0170.05011.12
5.2.130.0100.06010.98
5.2.120.0030.05711.04
5.2.110.0070.03311.25
5.2.100.0030.06311.09
5.2.90.0130.04011.09
5.2.80.0070.04310.98
5.2.70.0000.03710.99
5.2.60.0030.03310.93
5.2.50.0100.04710.83
5.2.40.0070.04010.89
5.2.30.0070.03711.05
5.2.20.0000.06710.90
5.2.10.0100.04010.86
5.2.00.0070.03710.71
5.1.60.0170.0379.89
5.1.50.0000.0509.95
5.1.40.0070.0439.88
5.1.30.0030.04710.34
5.1.20.0070.03310.43
5.1.10.0070.04010.13
5.1.00.0030.0579.91
5.0.50.0000.0278.52
5.0.40.0070.0208.38
5.0.30.0070.0608.21
5.0.20.0000.0278.16
5.0.10.0070.0378.25
5.0.00.0000.0408.06
4.4.90.0030.0177.71
4.4.80.0000.0277.71
4.4.70.0030.0277.71
4.4.60.0000.0237.71
4.4.50.0000.0237.71
4.4.40.0000.0537.71
4.4.30.0000.0177.71
4.4.20.0030.0337.71
4.4.10.0030.0237.71
4.4.00.0030.0407.71
4.3.110.0030.0177.71
4.3.100.0000.0307.71
4.3.90.0000.0207.71
4.3.80.0000.0577.71
4.3.70.0030.0137.71
4.3.60.0030.0177.71
4.3.50.0070.0377.71
4.3.40.0070.0437.71
4.3.30.0000.0307.71
4.3.20.0000.0207.71
4.3.10.0000.0377.71
4.3.00.0030.0137.71