3v4l.org

run code in 300+ PHP versions simultaneously
<?php // https://bugs.php.net/bug.php?id=45989 var_dump(json_decode('[')); // unmatched bracket var_dump(json_decode('{')); // unmatched brace var_dump(json_decode('{}}')); // unmatched brace var_dump(json_decode('{error error}')); // invalid object key/value notation var_dump(json_decode('["\"]')); // unclosed string var_dump(json_decode('[" \x "]')); // invalid escape code // Yet the following each returns the literal argument as a string: var_dump(json_decode(' [')); var_dump(json_decode(' {')); var_dump(json_decode(' {}}')); var_dump(json_decode(' {error error}')); var_dump(json_decode('"\"')); var_dump(json_decode('" \x "'));

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.70.0150.00316.63
8.3.60.0100.00718.21
8.3.50.0110.00921.99
8.3.40.0030.01518.90
8.3.30.0030.01020.25
8.3.20.0040.00418.52
8.3.10.0040.00420.97
8.3.00.0040.00419.56
8.2.180.0180.00416.50
8.2.170.0080.00822.96
8.2.160.0070.01020.52
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0140.00419.70
8.2.110.0050.00519.27
8.2.100.0080.00417.59
8.2.90.0040.00418.96
8.2.80.0050.00317.97
8.2.70.0090.00417.21
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0080.00019.82
8.2.30.0040.00419.36
8.2.20.0040.00417.45
8.2.10.0040.00417.43
8.2.00.0040.00417.63
8.1.280.0120.00325.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00021.27
8.1.230.0080.00317.42
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0060.00318.22
8.1.160.0050.00318.81
8.1.150.0040.00418.45
8.1.140.0040.00417.25
8.1.130.0030.00317.65
8.1.120.0000.00917.34
8.1.110.0080.00017.28
8.1.100.0040.00417.36
8.1.90.0070.00017.39
8.1.80.0000.00717.27
8.1.70.0000.00717.36
8.1.60.0040.00417.43
8.1.50.0070.00017.26
8.1.40.0080.00017.44
8.1.30.0030.00617.54
8.1.20.0000.00917.37
8.1.10.0050.00317.45
8.1.00.0000.01117.37
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00718.34
8.0.270.0000.00717.10
8.0.260.0000.00716.71
8.0.250.0000.00816.85
8.0.240.0000.00816.85
8.0.230.0070.00016.84
8.0.220.0070.00016.77
8.0.210.0020.00516.74
8.0.200.0030.00316.83
8.0.190.0070.00016.78
8.0.180.0000.00716.85
8.0.170.0030.00616.71
8.0.160.0030.00316.67
8.0.150.0040.00416.68
8.0.140.0060.00316.73
8.0.130.0050.00013.30
8.0.120.0000.00816.61
8.0.110.0000.00716.77
8.0.100.0080.00016.84
8.0.90.0040.00416.67
8.0.80.0050.01416.70
8.0.70.0040.00416.65
8.0.60.0040.00416.77
8.0.50.0000.00716.65
8.0.30.0120.00616.90
8.0.20.0060.01317.40
8.0.10.0030.00516.75
8.0.00.0100.00816.72
7.4.330.0060.00016.85
7.4.320.0000.00616.49
7.4.300.0000.00616.41
7.4.290.0040.00416.49
7.4.280.0000.00716.38
7.4.270.0000.00716.32
7.4.260.0000.00613.11
7.4.250.0000.00916.43
7.4.240.0030.00316.53
7.4.230.0050.00316.54
7.4.220.0070.01016.54
7.4.210.0100.00616.49
7.4.200.0030.00316.58
7.4.190.0040.00416.20
7.4.160.0100.01316.37
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0110.01016.42
7.4.120.0080.00816.38
7.4.110.0030.01316.37
7.4.100.0070.01016.28
7.4.90.0120.00816.16
7.4.80.0090.01219.39
7.4.70.0040.01116.38
7.4.60.0130.00316.41
7.4.50.0030.00616.41
7.4.40.0090.00622.77
7.4.30.0030.01416.47
7.4.00.0110.00414.82
7.3.330.0000.00513.03
7.3.320.0020.00213.02
7.3.310.0030.00316.29
7.3.300.0070.00016.19
7.3.290.0060.01216.10
7.3.280.0080.00816.13
7.3.270.0110.00617.40
7.3.260.0100.01018.24
7.3.250.0070.01416.23
7.3.240.0130.00416.23
7.3.230.0060.01016.39
7.3.210.0120.01216.15
7.3.200.0150.00319.39
7.3.190.0190.00316.20
7.3.180.0060.01016.30
7.3.170.0090.00616.27
7.3.160.0110.00416.27
7.3.120.0060.00714.76
7.2.330.0140.00316.32
7.2.320.0180.00016.55
7.2.310.0120.01316.25
7.2.300.0100.00616.14
7.2.290.0090.00616.46
7.2.00.0070.01019.25
7.1.100.0000.01417.82
7.1.70.0000.00716.98
7.1.60.0040.01519.24
7.1.50.0070.01716.66
7.1.00.0000.03722.51
7.0.200.0040.01416.76
7.0.140.0070.07321.95
7.0.100.0070.08020.02
7.0.90.0230.06319.94
7.0.80.0270.05019.96
7.0.70.0070.08319.90
7.0.60.0230.08319.86
7.0.50.0100.07320.32
7.0.40.0100.06720.15
7.0.30.0170.07320.14
7.0.20.0130.06020.19
7.0.10.0030.08020.11
7.0.00.0070.07020.06
5.6.280.0070.07021.14
5.6.250.0200.03320.72
5.6.240.0100.04720.65
5.6.230.0070.07720.67
5.6.220.0070.07320.52
5.6.210.0030.07720.55
5.6.200.0030.08321.04
5.6.190.0030.08720.96
5.6.180.0130.08021.11
5.6.170.0000.07321.11
5.6.160.0030.07020.95
5.6.150.0100.07321.02
5.6.140.0030.07721.16
5.6.130.0130.08021.11
5.6.120.0170.04321.13
5.6.110.0100.07020.92
5.6.100.0030.08721.15
5.6.90.0070.04721.08
5.6.80.0100.04020.27
5.6.70.0000.08720.38
5.6.60.0030.08020.37
5.6.50.0100.05320.41
5.6.40.0070.04020.40
5.6.30.0030.05720.41
5.6.20.0030.07720.52
5.6.10.0030.05320.43
5.6.00.0030.06020.45
5.5.380.0170.05720.55
5.5.370.0100.06320.36
5.5.360.0100.04320.34
5.5.350.0030.09020.46
5.5.340.0070.08020.80
5.5.330.0100.05320.73
5.5.320.0030.05020.93
5.5.310.0070.08020.92
5.5.300.0170.06720.89
5.5.290.0130.06720.75
5.5.280.0100.06020.90
5.5.270.0070.07320.86
5.5.260.0030.05020.75
5.5.250.0130.07720.73
5.5.240.0070.07720.16
5.5.230.0170.06320.26
5.5.220.0070.05020.17
5.5.210.0100.08320.29
5.5.200.0070.06720.16
5.5.190.0030.08320.27
5.5.180.0100.07320.13
5.5.160.0130.06320.18
5.5.150.0070.07319.97
5.5.140.0070.07320.24
5.5.130.0170.07020.11
5.5.120.0030.07320.26
5.5.110.0100.06320.21
5.5.100.0130.04020.08
5.5.90.0070.07320.05
5.5.80.0030.07720.13
5.5.70.0030.04720.11
5.5.60.0100.06720.05
5.5.50.0100.07720.05
5.5.40.0070.07020.13
5.5.30.0100.06319.95
5.5.20.0200.06320.04
5.5.10.0070.08020.00
5.5.00.0030.05320.02
5.4.450.0070.04019.37
5.4.440.0070.07719.22
5.4.430.0030.06719.42
5.4.420.0000.05019.41
5.4.410.0070.05319.29
5.4.400.0100.05719.23
5.4.390.0070.05019.04
5.4.380.0100.07718.98
5.4.370.0100.07019.11
5.4.360.0130.07319.04
5.4.350.0030.04319.10
5.4.340.0030.04719.10
5.4.320.0070.04719.12
5.4.310.0070.05019.05
5.4.300.0030.07719.05
5.4.290.0070.04319.04
5.4.280.0070.05019.02
5.4.270.0100.07018.89
5.4.260.0170.03319.04
5.4.250.0030.08018.81
5.4.240.0030.06018.89
5.4.230.0030.06019.07
5.4.220.0030.07319.01
5.4.210.0070.06319.03
5.4.200.0100.07018.80
5.4.190.0070.04019.02
5.4.180.0030.06719.14
5.4.170.0130.06318.89
5.4.160.0030.04719.07
5.4.150.0070.08018.96
5.4.140.0070.05016.30
5.4.130.0000.04016.21
5.4.120.0100.03016.23
5.4.110.0130.05016.35
5.4.100.0100.06016.26
5.4.90.0100.04316.42
5.4.80.0070.03316.44
5.4.70.0070.04716.39
5.4.60.0070.03316.25
5.4.50.0030.05016.34
5.4.40.0000.05716.42
5.4.30.0100.05716.41
5.4.20.0070.07316.32
5.4.10.0070.08016.18
5.4.00.0100.05015.78
5.3.290.0070.06714.49
5.3.280.0100.04714.59
5.3.270.0230.05314.57
5.3.260.0200.06014.46
5.3.250.0070.06714.60
5.3.240.0030.05314.61
5.3.230.0000.04314.48
5.3.220.0100.03714.43
5.3.210.0000.05714.51
5.3.200.0000.04014.56
5.3.190.0070.07714.50
5.3.180.0000.06314.55
5.3.170.0100.07314.55
5.3.160.0130.08314.51
5.3.150.0130.05314.54
5.3.140.0070.04314.40
5.3.130.0070.07714.49
5.3.120.0030.08314.54
5.3.110.0000.05014.51
5.3.100.0070.05014.02
5.3.90.0030.04013.98
5.3.80.0000.04314.03
5.3.70.0030.06714.01
5.3.60.0070.04013.96
5.3.50.0030.05713.91
5.3.40.0070.06013.94
5.3.30.0130.05313.77
5.3.20.0100.07313.65
5.3.10.0000.06713.60
5.3.00.0030.05013.50
5.2.170.0070.05310.99
5.2.160.0000.04711.16
5.2.150.0100.04311.17
5.2.140.0070.02711.12
5.2.130.0030.04011.14
5.2.120.0030.02711.06
5.2.110.0070.05011.02
5.2.100.0070.04011.05
5.2.90.0070.05011.14
5.2.80.0030.05011.12
5.2.70.0000.05010.91
5.2.60.0100.06011.07
5.2.50.0030.05710.84
5.2.40.0070.03011.00
5.2.30.0100.02710.96
5.2.20.0070.06010.82
5.2.10.0070.04010.88
5.2.00.0100.02710.63
5.1.60.0030.0239.98
5.1.50.0100.03310.07
5.1.40.0030.0509.96
5.1.30.0030.05710.25
5.1.20.0070.03010.21
5.1.10.0030.05310.11
5.1.00.0030.04310.11
5.0.50.0030.0478.63
5.0.40.0030.0438.41
5.0.30.0100.0578.25
5.0.20.0000.0438.20
5.0.10.0000.0438.24
5.0.00.0000.0708.19
4.4.90.0070.0238.19
4.4.80.0030.0378.19
4.4.70.0000.0178.19
4.4.60.0030.0338.19
4.4.50.0030.0178.19
4.4.40.0070.0478.19
4.4.30.0030.0338.19
4.4.20.0000.0338.19
4.4.10.0100.0238.19
4.4.00.0070.0508.19
4.3.110.0030.0278.19
4.3.100.0000.0378.19
4.3.90.0100.0108.19
4.3.80.0000.0508.19
4.3.70.0030.0308.19
4.3.60.0100.0108.19
4.3.50.0070.0138.19
4.3.40.0000.0538.19
4.3.30.0030.0238.19
4.3.20.0000.0378.19
4.3.10.0030.0138.19
4.3.00.0030.0138.19

preferences:
44.76 ms | 401 KiB | 5 Q