3v4l.org

run code in 300+ PHP versions simultaneously
<?php function guzzle_json_decode($json, $assoc = false, $depth = 512, $options = 0) { $data = \json_decode($json, $assoc, $depth, $options); if (JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException( 'json_decode error: ' . json_last_error_msg() ); } return $data; } $json = json_encode(""); var_dump(guzzle_json_decode("", true)); var_dump(json_last_error());

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.0040.01218.55
8.3.50.0100.01018.28
8.3.40.0120.00418.87
8.3.30.0070.00718.73
8.3.20.0040.00419.07
8.3.10.0020.00521.59
8.3.00.0060.00320.77
8.2.180.0090.01218.66
8.2.170.0070.00722.96
8.2.160.0130.00022.08
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00419.79
8.2.120.0040.00426.35
8.2.110.0040.00419.39
8.2.100.0040.00818.03
8.2.90.0030.00617.63
8.2.80.0050.00317.97
8.2.70.0040.00417.80
8.2.60.0030.00618.22
8.2.50.0050.00218.10
8.2.40.0040.00419.29
8.2.30.0040.00419.31
8.2.20.0070.00318.05
8.2.10.0050.00217.95
8.2.00.0040.00417.73
8.1.280.0110.00425.92
8.1.270.0080.00022.05
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00720.98
8.1.230.0080.00317.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00717.50
8.1.190.0040.00417.36
8.1.180.0000.00718.10
8.1.170.0000.00818.48
8.1.160.0030.00518.90
8.1.150.0000.00718.90
8.1.140.0050.00222.15
8.1.130.0030.00320.14
8.1.120.0000.00717.46
8.1.110.0040.00417.50
8.1.100.0050.00217.47
8.1.90.0050.00317.35
8.1.80.0030.00617.41
8.1.70.0060.00317.46
8.1.60.0090.00017.56
8.1.50.0000.00817.42
8.1.40.0080.00017.53
8.1.30.0040.00417.68
8.1.20.0000.00717.55
8.1.10.0040.00417.49
8.1.00.0080.00017.50
8.0.300.0030.00518.77
8.0.290.0070.00016.88
8.0.280.0070.00018.51
8.0.270.0070.00017.27
8.0.260.0000.00618.45
8.0.250.0030.00317.04
8.0.240.0040.00417.03
8.0.230.0080.00017.00
8.0.220.0070.00017.04
8.0.210.0040.00316.92
8.0.200.0050.00316.91
8.0.190.0050.00217.04
8.0.180.0000.00817.03
8.0.170.0050.00316.95
8.0.160.0030.00517.06
8.0.150.0100.00016.80
8.0.140.0040.00416.92
8.0.130.0030.00313.40
8.0.120.0050.00316.89
8.0.110.0000.00816.86
8.0.100.0050.00317.07
8.0.90.0050.00317.02
8.0.80.0020.01316.95
8.0.70.0080.00016.82
8.0.60.0050.00317.08
8.0.50.0000.00716.91
8.0.30.0110.01117.16
8.0.20.0080.01317.40
8.0.10.0000.00717.00
8.0.00.0090.00916.88
7.4.330.0020.00215.55
7.4.320.0000.00716.47
7.4.300.0000.00716.66
7.4.290.0000.00716.65
7.4.280.0000.00716.50
7.4.270.0050.00316.50
7.4.260.0000.00716.52
7.4.250.0000.00716.57
7.4.240.0070.00016.62
7.4.230.0000.00716.67
7.4.220.0030.00516.36
7.4.210.0100.00816.63
7.4.200.0030.00316.59
7.4.160.0050.01316.60
7.4.140.0120.00617.86
7.4.130.0070.01016.77
7.4.120.0090.00816.54
7.4.110.0180.00616.56
7.4.100.0120.00616.70
7.4.90.0150.00316.53
7.4.80.0100.00619.39
7.4.70.0150.00616.48
7.4.60.0040.01516.61
7.4.50.0080.00816.32
7.4.40.0100.01416.50
7.4.00.0000.01415.04
7.3.330.0060.00013.30
7.3.320.0000.00513.18
7.3.310.0040.00416.39
7.3.300.0030.00316.21
7.3.290.0000.00716.22
7.3.280.0120.00516.29
7.3.260.0120.00816.44
7.3.240.0080.00916.44
7.3.230.0070.01016.65
7.3.210.0110.00716.44
7.3.200.0130.00316.56
7.3.190.0100.01016.32
7.3.180.0160.00616.42
7.3.170.0090.00916.44
7.3.160.0060.00916.53
7.2.330.0090.00916.67
7.2.320.0100.01016.71
7.2.310.0070.01016.59
7.2.300.0030.01216.65
7.2.290.0070.01016.50
7.2.110.0950.00614.50
7.2.100.0900.01014.47
7.2.90.0670.01014.88
7.2.80.0920.00314.85
7.2.70.0940.00315.11
7.2.60.0610.00915.12
7.2.50.0640.01015.08
7.2.40.0570.00914.96
7.2.30.0700.00615.19
7.2.20.1050.01014.97
7.2.10.0720.01215.12
7.2.00.0890.01015.06
7.1.230.0560.00613.86
7.1.220.0710.00913.75
7.1.210.0850.00313.71
7.1.200.0960.00313.93
7.1.190.0700.00613.81
7.1.180.0650.00013.68
7.1.170.0680.00013.90
7.1.160.0630.00413.90
7.1.150.0770.01014.05
7.1.140.0820.01013.85
7.1.130.0870.01013.78
7.1.120.0730.01013.55
7.1.110.0440.00713.98
7.1.100.0870.01013.81
7.1.90.0980.00613.84
7.1.80.0830.00413.54
7.1.70.0740.01613.52
7.1.60.0830.00631.68
7.1.50.1110.01731.26
7.1.40.1360.00331.55
7.1.30.1460.01031.30
7.1.20.1270.01031.57
7.1.10.1010.00913.04
7.1.00.0730.00013.30
5.6.380.0140.00613.65

preferences:
55.35 ms | 400 KiB | 5 Q