3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = json_decode('{"3":{"friend":45,"all":100},"2":{"friend":30,"all":50},"1":{"friend":25,"all":25}}'); $b = 3; var_dump($a->$b); /*var_dump($a['3']); var_dump($a["3"]); var_dump($a[(string) 3]);*/

Here you find the average performance (time & memory) of each version. A greyed 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.0040.00819.48
7.1.100.0030.01018.08
7.1.70.0040.00717.23
7.1.60.0150.00919.82
7.1.50.0000.01416.90
7.1.00.0070.07322.45
7.0.200.0000.00716.35
7.0.140.0030.06722.12
7.0.60.0030.04319.99
7.0.50.0100.08317.91
7.0.40.0070.06720.27
7.0.30.0200.05020.18
7.0.20.0230.05020.09
7.0.10.0100.03720.18
7.0.00.0000.05019.99
5.6.210.0070.07720.55
5.6.200.0130.08018.16
5.6.190.0130.08320.49
5.6.180.0270.07720.61
5.6.170.0230.07320.51
5.6.160.0000.05020.33
5.6.150.0070.08018.23
5.6.140.0030.05018.11
5.6.130.0100.05018.10
5.6.120.0030.04721.07
5.6.110.0070.08321.01
5.6.100.0100.06721.10
5.6.90.0070.08720.99
5.6.80.0130.07720.52
5.5.350.0000.08320.52
5.5.340.0100.08017.97
5.5.330.0100.08020.43
5.5.320.0300.08020.30
5.5.310.0070.04720.29
5.5.300.0030.05317.92
5.5.290.0100.07717.97
5.5.280.0230.05320.80
5.5.270.0070.04720.86
5.5.260.0100.03720.86
5.5.250.0030.08320.71
5.5.240.3070.03020.25
5.4.450.1400.03319.42
5.4.440.0200.03719.10
5.4.430.0970.04719.40
5.4.420.0730.06019.42
5.4.410.0400.04019.10
5.4.400.1030.03319.08
5.4.390.1030.04319.09
5.4.380.0200.05018.66
5.4.370.0230.06018.66
5.4.360.0170.05318.62
5.4.350.0170.05018.71
5.4.340.0100.05318.61
5.4.320.0080.04712.45
5.4.310.0110.03712.45
5.4.300.0070.03512.46
5.4.290.0040.04212.45
5.4.280.0070.04512.35
5.4.270.0060.03812.35
5.4.260.0090.03812.35
5.4.250.0100.05018.74
5.4.240.0130.05018.70
5.4.230.0070.05718.73
5.4.220.0000.06018.79
5.4.210.0030.05719.03
5.4.200.0070.05718.83
5.4.190.0230.03718.83
5.4.180.0070.06318.71
5.4.170.0130.05018.91
5.4.160.0070.05018.88
5.4.150.0070.05718.70
5.4.140.0170.06016.51
5.4.130.0100.04716.38
5.4.120.0030.07316.48
5.4.110.0230.04716.20
5.4.100.0100.04716.42
5.4.90.0130.06316.34
5.4.80.0100.05316.38
5.4.70.0170.04016.33
5.4.60.0070.05016.31
5.4.50.0100.04716.39
5.4.40.0100.05016.45
5.4.30.0100.04716.22
5.4.20.0130.07016.36
5.4.10.0130.04716.39
5.4.00.0030.05015.71
5.3.290.0080.04412.80
5.3.280.0070.05014.45
5.3.270.0070.05714.48
5.3.260.0070.05314.65
5.3.250.0100.06314.63
5.3.240.0130.04714.61
5.3.230.0070.05014.60
5.3.220.0230.05014.43
5.3.210.0100.05014.46
5.3.200.0070.05014.44
5.3.190.0130.04314.59
5.3.180.0170.04714.45
5.3.170.0030.06314.71
5.3.160.0130.04314.71
5.3.150.0100.04714.67
5.3.140.0100.05014.73
5.3.130.0170.05314.61
5.3.120.0070.05314.40
5.3.110.0200.04014.38
5.3.100.0130.05014.05
5.3.90.0130.06014.04
5.3.80.0200.04313.85
5.3.70.0100.05313.86
5.3.60.0030.06013.84
5.3.50.0200.03714.04
5.3.40.0100.05013.96
5.3.30.0030.07713.93
5.3.20.0030.05313.71
5.3.10.0100.06713.66
5.3.00.0070.05713.35
5.2.170.0030.06011.03
5.2.160.0030.05310.98
5.2.150.0070.04311.07
5.2.140.0030.05711.15
5.2.130.0100.04311.25
5.2.120.0070.05710.98
5.2.110.0030.04711.11
5.2.100.0070.04311.00
5.2.90.0070.04711.03
5.2.80.0130.04311.24
5.2.70.0130.05711.08
5.2.60.0100.05010.89
5.2.50.0100.05010.95
5.2.40.0000.04311.14
5.2.30.0100.04010.73
5.2.20.0030.05710.98
5.2.10.0100.03710.82
5.2.00.0070.04010.79
5.1.60.0100.02710.18
5.1.50.0000.0509.90
5.1.40.0070.0479.85
5.1.30.0030.03310.40
5.1.20.0070.03310.11
5.1.10.0030.03710.14
5.1.00.0070.0379.96
5.0.50.0030.0308.46
5.0.40.0100.0378.46
5.0.30.0070.0407.98
5.0.20.0070.0338.14
5.0.10.0130.0308.40
5.0.00.0030.0538.07
4.4.90.0030.0207.52
4.4.80.0070.0277.52
4.4.70.0030.0237.52
4.4.60.0000.0237.52
4.4.50.0070.0177.52
4.4.40.0030.0337.52
4.4.30.0000.0337.52
4.4.20.0030.0237.52
4.4.10.0030.0237.52
4.4.00.0070.0407.52
4.3.110.0000.0237.52
4.3.100.0030.0207.52
4.3.90.0030.0207.52
4.3.80.0070.0307.52
4.3.70.0100.0207.52
4.3.60.0000.0337.52
4.3.50.0000.0237.52
4.3.40.0030.0337.52
4.3.30.0030.0207.52
4.3.20.0070.0177.52
4.3.10.0030.0277.52
4.3.00.0000.01714.52