3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $stuff = '{ "is_tall": [ "BOOLEAN", false ], "profile": { "fav_color": [ "STRING", true ], "sport": [ "STRING", true ] }, "awesome": "BOOLEAN" }'; $what = json_decode($stuff); //var_dump($what); echo is_object($what); die(); echo "is is_tall an array???\r\n"; echo is_array($what->input->is_tall)."\r\n\r\n"; echo "is profile an array???\r\n"; echo is_array($what->input->profile)."\r\n\r\n"; echo "is profile an object???\r\n"; echo is_object($what->input->profile)."\r\n\r\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.2.60.0030.00616.95
7.2.00.0030.01019.09
7.1.200.0000.01115.71
7.1.100.0030.00718.02
7.1.70.0030.00916.95
7.1.60.0100.01619.70
7.1.50.0170.00816.48
7.1.00.0030.07722.42
7.0.200.0290.00714.64
7.0.140.0000.07722.08
7.0.60.0100.05019.93
7.0.50.0070.08017.81
7.0.40.0030.04320.29
7.0.30.0400.07020.13
7.0.20.0170.08020.09
7.0.10.0030.07020.09
7.0.00.0070.06020.12
5.6.280.0000.07721.15
5.6.210.0070.07320.56
5.6.200.0200.07718.16
5.6.190.0030.04720.61
5.6.180.3130.04020.59
5.6.170.0230.07020.62
5.6.160.0200.07320.53
5.6.150.0070.04018.11
5.6.140.0000.07718.09
5.6.130.0130.04018.11
5.6.120.0030.04321.00
5.6.110.0200.07020.98
5.6.100.0130.08021.03
5.6.90.0130.07320.96
5.6.80.0100.08020.37
5.6.70.4430.04020.53
5.5.350.0230.04320.37
5.5.340.0030.05717.99
5.5.330.0130.07720.47
5.5.320.3370.04020.24
5.5.310.0400.07020.23
5.5.300.0030.05717.89
5.5.290.0170.04017.89
5.5.280.0030.04020.79
5.5.270.0000.04720.95
5.5.260.0030.07720.81
5.5.250.0130.08020.68
5.5.240.0170.06320.15
5.4.450.1800.04719.43
5.4.440.1800.04719.57
5.4.430.1870.03719.42
5.4.420.1570.03719.48
5.4.410.1800.04319.08
5.4.400.1730.04318.93
5.4.390.1770.04018.93
5.4.380.1630.04319.24
5.4.370.1570.04019.22
5.4.360.1930.05019.09
5.4.350.1630.03718.78
5.4.340.1300.03719.09
5.4.320.0100.04319.08
5.4.310.0000.08018.93
5.4.300.0800.03718.88
5.4.290.1870.04719.13
5.4.280.1770.05319.24
5.4.270.1500.04019.06
5.4.260.1530.04019.09
5.4.250.1600.03719.09
5.4.240.1570.03719.06
5.4.230.1530.03718.80
5.4.220.1770.05019.03
5.4.210.1570.03719.24
5.4.200.1800.03719.09
5.4.190.1700.03719.09
5.4.180.0070.03319.08
5.4.170.0030.03719.12
5.4.160.0800.04319.14
5.4.150.1530.04019.07
5.4.140.1670.03316.19
5.4.130.1730.03016.16
5.4.120.1600.03316.32
5.4.110.1730.03716.23
5.4.100.1570.03316.40
5.4.90.1600.03316.39
5.4.80.1500.04016.48
5.4.70.1730.03316.20
5.4.60.1770.04316.25
5.4.50.1730.03716.31
5.4.40.0570.05316.16
5.4.30.0000.05316.43
5.4.20.0030.04316.04
5.4.10.1370.03716.36
5.4.00.1770.04315.71
5.3.290.1870.04714.53
5.3.280.1800.04714.59
5.3.270.1500.04014.45
5.3.260.1730.04714.70
5.3.250.1570.03314.46
5.3.240.1670.04314.54
5.3.230.1630.04314.50
5.3.220.1500.04014.55
5.3.210.1530.03714.51
5.3.200.1000.06014.45
5.3.190.0000.08014.66
5.3.180.0070.04314.50
5.3.170.1700.03714.47
5.3.160.1730.04314.37
5.3.150.1800.04314.42
5.3.140.1730.04314.61
5.3.130.1730.04714.57
5.3.120.1730.04014.57
5.3.110.1600.04314.45
5.3.100.1430.04313.89
5.3.90.1670.02713.97
5.3.80.1570.03714.04
5.3.70.1670.02313.90
5.3.60.1200.02713.95
5.3.50.0070.07313.86
5.3.40.0070.06313.89
5.3.30.1000.06013.76
5.3.20.1670.03013.61
5.3.10.1800.04313.56
5.3.00.1530.03313.48
5.2.170.1470.04011.19
5.2.160.1470.03711.00
5.2.150.1670.04011.09
5.2.140.1330.02711.15
5.2.130.1470.03711.12
5.2.120.1530.04010.95
5.2.110.1500.03310.94
5.2.100.1570.02711.15
5.2.90.1200.03311.18
5.2.80.1530.03311.10
5.2.70.1400.03310.95
5.2.60.1530.03311.13
5.2.50.1370.03710.88
5.2.40.1370.04011.04
5.2.30.1300.03311.04
5.2.20.1070.03010.81
5.2.10.1070.02710.71
5.2.00.1330.03710.79
5.1.60.1070.0309.87
5.1.50.1100.0239.93
5.1.40.1330.02710.13
5.1.30.1100.02710.24
5.1.20.1130.02010.24
5.1.10.0600.0209.93
5.1.00.0030.02310.11
5.0.50.0000.0208.62
5.0.40.0000.0208.52
5.0.30.0000.0308.52
5.0.20.0000.0208.52
5.0.10.0000.0208.52
5.0.00.0530.0308.52
4.4.90.0500.0178.52
4.4.80.0570.0178.52
4.4.70.0500.0178.52
4.4.60.0500.0178.52
4.4.50.0500.0178.52
4.4.40.0330.0178.52
4.4.30.0030.0138.52
4.4.20.0030.0278.52
4.4.10.0070.0138.52
4.4.00.0070.0308.52
4.3.110.0000.0178.52
4.3.100.0070.0138.52
4.3.90.0070.0108.52
4.3.80.0000.0238.52
4.3.70.0000.0178.52
4.3.60.0000.0178.52
4.3.50.0270.0138.52
4.3.40.0500.0278.52
4.3.30.0230.0178.52
4.3.20.0400.0238.52
4.3.10.0300.0138.52
4.3.00.0400.0238.52