3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = " [ \"JSON Test Pattern pass1\", {\"object with 1 member\":[\"array with 1 element\"]}, {}, [], -42, true, false, null, { \"integer\": 1234567890, \"real\": -9876.543210, \"e\": 0.123456789e-12, \"E\": 1.234567890E+34, \"\": 23456789012E666, \"E no .\": 4E12, \"zero\": 0, \"one\": 1, \"space\": \" \", \"quote\": \"\\\"\", \"backslash\": \"\\\\\", \"controls\": \"\\b\\f\\n\\r\\t\", \"slash\": \"/ & \\/\", \"alpha\": \"abcdefghijklmnopqrstuvwyz\", \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWYZ\", \"digit\": \"0123456789\", \"special\": \"`1~!@#$%^&*()_+-={':[,]}|;.</>?\", \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\", \"unicode\": \"\\u30d7\\u30ec\\u30b9\\u30ad\\u30c3\\u30c8\", \"プレスキット\": \"プレスキット\", \"empty_string\": \"\", \"true\": true, \"false\": false, \"null\": null, \"array\":[ ], \"object\":{ }, \"123\":{\"456\":{\"abc\":{\"789\":\"def\",\"012\":[1,2,\"5\",500],\"ghi\":[1,2,\"five\",50,\"sixty\"]}}}, \"address\": \"50 St. James Street\", \"url\": \"http://www.JSON.org/\", \"comment\": \"// /* <!-- --\", \"# -- --> */\": \" \", \" s p a c e d \" :[1,2 , 3 , 4 , 5 , 6 ,7 ], \"compact\": [1,2,3,4,5,6,7], \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\", \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\", \"\\/\\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?\" : \"A key can be any string\" }, 0.5 ,98.6 , 99.44 , 1066 ,\"rosebud\"] "; $res = json_decode($test, true); if (json_last_error() != JSON_ERROR_NONE) { die(json_last_error_msg()); } var_dump($res);

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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0110.00816.63
8.3.50.0100.00821.92
8.3.40.0100.00618.74
8.3.30.0170.00018.54
8.3.20.0080.00020.34
8.3.10.0050.00521.80
8.3.00.0090.00019.26
8.2.180.0150.00718.27
8.2.170.0000.01522.96
8.2.160.0000.01420.39
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0130.00017.63
8.2.120.0060.00326.35
8.2.110.0090.00020.35
8.2.100.0120.00017.91
8.2.90.0080.00019.11
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0040.00419.46
8.2.30.0030.00620.70
8.2.20.0070.00317.65
8.2.10.0000.00817.96
8.2.00.0080.00018.19
8.1.280.0090.00625.92
8.1.270.0060.00322.09
8.1.260.0000.00728.09
8.1.250.0080.00028.09
8.1.240.0030.00622.42
8.1.230.0040.00817.53
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00917.10
8.1.190.0080.00017.13
8.1.180.0000.00818.10
8.1.170.0000.00918.49
8.1.160.0020.00521.94
8.1.150.0000.00718.82
8.1.140.0040.00419.51
8.1.130.0040.00417.79
8.1.120.0030.00617.54
8.1.110.0040.00417.52
8.1.100.0040.00417.50
8.1.90.0000.00717.36
8.1.80.0000.00817.54
8.1.70.0050.00317.45
8.1.60.0050.00517.65
8.1.50.0000.00817.55
8.1.40.0030.00517.44
8.1.30.0030.00617.69
8.1.20.0040.00417.75
8.1.10.0000.00817.52
8.1.00.0060.00317.29
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.33
8.0.270.0040.00417.22
8.0.260.0030.00317.25
8.0.250.0070.00016.95
8.0.240.0030.00316.92
8.0.230.0070.00016.90
8.0.220.0070.00016.79
8.0.210.0070.00016.89
8.0.200.0080.00016.96
8.0.190.0040.00416.93
8.0.180.0080.00016.81
8.0.170.0050.00316.75
8.0.160.0050.00216.77
8.0.150.0040.00416.79
8.0.140.0000.00816.79
8.0.130.0060.00013.30
8.0.120.0050.00316.80
8.0.110.0000.00716.88
8.0.100.0050.00216.85
8.0.90.0040.00416.89
8.0.80.0100.00716.86
8.0.70.0040.00416.83
8.0.60.0040.00416.74
8.0.50.0000.00716.91
8.0.30.0120.00717.24
8.0.20.0130.00717.40
8.0.10.0060.00317.09
8.0.00.0090.01316.70
7.4.330.0050.00015.08
7.4.320.0030.00316.54
7.4.300.0030.00316.54
7.4.290.0000.00716.52
7.4.280.0070.00016.64
7.4.270.0030.00316.58
7.4.260.0040.00416.47
7.4.250.0040.00416.47
7.4.240.0020.00516.56
7.4.230.0040.00416.63
7.4.220.0130.00616.66
7.4.210.0090.01016.61
7.4.200.0000.00716.52
7.4.160.0080.01316.38
7.4.150.0100.01017.40
7.4.140.0140.01017.86
7.4.130.0120.01216.52
7.4.120.0100.01016.56
7.4.110.0120.00916.38
7.4.100.0070.01416.55
7.4.90.0050.01416.26
7.4.80.0110.00819.39
7.4.70.0060.01216.63
7.4.60.0070.01416.30
7.4.50.0060.00316.54
7.4.40.0090.00916.29
7.4.30.0090.01216.57
7.4.00.0030.01015.06
7.3.330.0050.00013.09
7.3.320.0030.00313.13
7.3.310.0000.00816.23
7.3.300.0070.00016.22
7.3.290.0000.00716.05
7.3.280.0070.00916.24
7.3.270.0110.00817.40
7.3.260.0170.00316.21
7.3.250.0130.00616.22
7.3.240.0120.00916.38
7.3.230.0140.00716.39
7.3.210.0140.00616.22
7.3.200.0160.00316.27
7.3.190.0040.01516.18
7.3.180.0100.00616.22
7.3.170.0130.00616.31
7.3.160.0140.00616.19
7.3.10.0090.00616.33
7.3.00.0130.00316.66
7.2.330.0070.01416.48
7.2.320.0170.01016.37
7.2.310.0070.01416.38
7.2.300.0060.01216.27
7.2.290.0140.00716.27
7.2.130.0050.00516.84
7.2.120.0000.01416.91
7.2.110.0090.00916.82
7.2.100.0000.01416.78
7.2.90.0070.01416.58
7.2.80.0040.01416.78
7.2.70.0110.00016.77
7.2.60.0070.01016.91
7.2.50.0030.00616.63
7.2.40.0080.01116.55
7.2.30.0130.00016.70
7.2.20.0070.01016.68
7.2.10.0090.00616.77
7.2.00.0080.01116.86
7.1.250.0100.00715.76
7.1.240.0000.00915.57
7.1.230.0040.00715.57
7.1.220.0000.01115.78
7.1.210.0000.01015.45
7.1.200.0060.00915.78
7.1.190.0030.00715.69
7.1.180.0030.00715.88
7.1.170.0070.01015.80
7.1.160.0040.00915.98
7.1.150.0030.01015.95
7.1.140.0070.00315.53
7.1.130.0060.00615.81
7.1.120.0030.00915.40
7.1.110.0040.00715.84
7.1.100.0050.00916.84
7.1.90.0100.00315.43
7.1.80.0120.00615.68
7.1.70.0060.00616.43
7.1.60.0070.00817.46
7.1.50.0090.01425.16
7.1.40.0160.00015.38
7.1.30.0060.00615.73
7.1.20.0030.00615.66
7.1.10.0030.00615.37
7.1.00.0110.03819.12
7.0.330.0100.00715.11
7.0.320.0030.01015.34
7.0.310.0040.01115.42
7.0.300.0080.00815.32
7.0.290.0070.00715.27
7.0.280.0030.01115.44
7.0.270.0070.00715.09
7.0.260.0100.00315.45
7.0.250.0030.01015.54
7.0.240.0030.01015.43
7.0.230.0170.00015.02
7.0.220.0030.01015.20
7.0.210.0070.00715.13
7.0.200.0180.00514.85
7.0.190.0090.00915.11
7.0.180.0070.00715.56
7.0.170.0000.00915.09
7.0.160.0070.00715.21
7.0.150.0090.00615.55
7.0.140.0080.00715.10
7.0.130.0130.00315.15
7.0.120.0070.01115.41
7.0.110.0120.00615.36
7.0.100.0070.01015.39
7.0.90.0140.00015.21
7.0.80.0000.01715.39
7.0.70.0030.00715.33
7.0.60.0100.04217.57
7.0.50.0130.03816.54
7.0.40.0080.04316.88
7.0.30.0000.02816.71
7.0.20.0130.04516.66
7.0.10.0050.04316.84
7.0.00.0050.03016.71
5.6.380.0070.00314.23
5.6.370.0130.00314.67
5.6.360.0000.01714.36
5.6.350.0100.00314.13
5.6.340.0070.01014.17
5.6.330.0040.00714.14
5.6.320.0070.00714.42
5.6.310.0170.00014.48
5.6.300.0080.00814.40
5.6.290.0070.00714.48
5.6.280.0050.02917.64
5.6.270.0090.00614.23
5.6.260.0080.00814.34
5.6.250.0070.00814.00
5.6.240.0080.00414.55
5.6.230.0090.00614.33
5.6.220.0030.01414.00
5.6.210.0110.04117.47
5.6.200.0030.04216.26
5.6.190.0080.03017.32
5.6.180.0230.02517.27
5.6.170.0100.02817.34
5.6.160.0060.02517.29
5.6.150.0030.02816.28
5.6.140.0030.02516.19
5.6.130.0100.02216.19
5.6.120.0030.02717.71
5.6.110.0110.04317.56
5.6.100.0060.03517.50
5.6.90.0140.04317.61
5.6.80.0030.04717.08
5.6.70.0100.00313.98
5.6.60.0080.00314.08
5.6.50.0110.01114.18
5.6.40.0090.00414.29
5.6.30.0030.01414.13
5.6.20.0000.01413.88
5.6.10.0070.01414.38
5.6.00.0060.01014.13
5.5.380.0000.01210.61
5.5.370.0070.00010.95
5.5.360.0080.00411.00
5.5.350.1480.02015.66
5.5.340.0100.03114.24
5.5.330.0050.02815.54
5.5.320.0130.04315.54
5.5.310.0120.02915.58
5.5.300.0060.02614.54
5.5.290.0020.05014.47
5.5.280.0070.03715.77
5.5.270.0030.04715.62
5.5.260.0100.01915.89
5.5.250.0080.04015.71
5.5.240.0050.03715.27
5.5.230.0070.00310.87
5.5.220.0030.00310.80
5.5.210.0110.00810.77
5.5.200.0060.00611.01
5.5.190.0000.01111.09
5.5.180.0030.00710.89
5.5.170.0070.00410.74
5.5.160.0040.00410.86
5.5.150.0060.00610.95
5.5.140.0040.00710.50
5.5.130.0000.00710.81
5.5.120.0100.00010.99
5.5.110.0070.00310.68
5.5.100.0090.00610.91
5.5.90.0040.00810.81
5.5.80.0050.00310.92
5.5.70.0090.00910.97
5.5.60.0000.01410.70
5.5.50.0060.00310.74
5.5.40.0060.00610.97
5.5.30.0000.01210.71
5.5.20.0040.00810.86
5.5.10.0100.00710.35
5.5.00.0000.01410.42

preferences:
52.79 ms | 401 KiB | 5 Q