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($json, 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.0030.01318.43
8.3.50.0070.01417.92
8.3.40.0160.00018.69
8.3.30.0120.00318.76
8.3.20.0080.00019.26
8.3.10.0060.00321.89
8.3.00.0000.00720.58
8.2.180.0040.01118.54
8.2.170.0110.00422.96
8.2.160.0070.00722.30
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00019.83
8.2.120.0060.00326.35
8.2.110.0030.00619.27
8.2.100.0090.00317.72
8.2.90.0000.00817.50
8.2.80.0080.00017.97
8.2.70.0040.00417.78
8.2.60.0040.00418.03
8.2.50.0030.00518.10
8.2.40.0000.00919.39
8.2.30.0040.00419.30
8.2.20.0000.00818.00
8.2.10.0050.00217.88
8.2.00.0040.00417.54
8.1.280.0080.00625.92
8.1.270.0080.00022.22
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00720.87
8.1.230.0040.00817.77
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00817.22
8.1.190.0040.00417.10
8.1.180.0070.00018.10
8.1.170.0000.00818.46
8.1.160.0040.00418.75
8.1.150.0040.00418.76
8.1.140.0000.00722.14
8.1.130.0030.00320.13
8.1.120.0070.00017.41
8.1.110.0080.00017.40
8.1.100.0070.00017.31
8.1.90.0040.00417.34
8.1.80.0030.00617.43
8.1.70.0040.00417.29
8.1.60.0000.01017.52
8.1.50.0040.00417.50
8.1.40.0050.00317.54
8.1.30.0040.00517.69
8.1.20.0070.00417.65
8.1.10.0030.00617.52
8.1.00.0090.00017.34
8.0.300.0000.00818.77
8.0.290.0050.00316.63
8.0.280.0030.00318.45
8.0.270.0070.00017.11
8.0.260.0030.00318.36
8.0.250.0000.00616.87
8.0.240.0030.00316.73
8.0.230.0030.00616.85
8.0.220.0060.00016.83
8.0.210.0040.00416.75
8.0.200.0070.00016.77
8.0.190.0070.00016.85
8.0.180.0030.00516.84
8.0.170.0000.00816.87
8.0.160.0000.00716.88
8.0.150.0030.00516.75
8.0.140.0070.00016.85
8.0.130.0050.00013.26
8.0.120.0040.00416.83
8.0.110.0040.00416.69
8.0.100.0000.00716.67
8.0.90.0040.00416.95
8.0.80.0100.00816.78
8.0.70.0040.00416.88
8.0.60.0030.00516.90
8.0.50.0000.00716.78
8.0.30.0110.00716.84
8.0.20.0150.00417.40
8.0.10.0040.00416.84
8.0.00.0120.00816.92
7.4.330.0050.00015.55
7.4.320.0040.00416.52
7.4.300.0060.00016.57
7.4.290.0030.00316.51
7.4.280.0030.00616.64
7.4.270.0040.00416.52
7.4.260.0040.00416.67
7.4.250.0070.00016.58
7.4.240.0000.00716.55
7.4.230.0050.00316.61
7.4.220.0040.00416.62
7.4.210.0060.01116.61
7.4.200.0000.00716.32
7.4.160.0100.00516.43
7.4.140.0090.00917.86
7.4.130.0150.00316.48
7.4.120.0090.01016.52
7.4.110.0100.00716.50
7.4.100.0090.00916.46
7.4.90.0100.00616.59
7.4.80.0100.00619.39
7.4.70.0080.00816.49
7.4.60.0080.01516.38
7.4.50.0060.00916.37
7.4.40.0110.01116.36
7.4.00.0000.01215.16
7.3.330.0000.00513.12
7.3.320.0000.00513.18
7.3.310.0040.00416.33
7.3.300.0000.00716.12
7.3.290.0060.00016.17
7.3.280.0100.00516.21
7.3.260.0050.01216.47
7.3.240.0070.01216.52
7.3.230.0080.00716.59
7.3.210.0150.00316.33
7.3.200.0190.00316.22
7.3.190.0100.01316.34
7.3.180.0070.01016.32
7.3.170.0120.00616.28
7.3.160.0130.00316.48
7.3.10.0070.00716.54
7.3.00.0040.00416.68
7.2.330.0160.00316.33
7.2.320.0080.01116.68
7.2.310.0040.01316.40
7.2.300.0060.00916.56
7.2.290.0140.00316.43
7.2.130.0070.00416.86
7.2.120.0060.00616.85
7.2.110.0050.01015.38
7.2.100.0090.00515.41
7.2.90.0800.00815.55
7.2.80.0140.00615.59
7.2.70.0080.00915.88
7.2.60.0110.00515.79
7.2.50.0530.00815.72
7.2.40.0080.00715.80
7.2.30.0400.00515.78
7.2.20.0060.00915.88
7.2.10.0070.00815.85
7.2.00.0080.01015.77
7.1.250.0050.00515.76
7.1.230.0720.00413.51
7.1.220.0680.00613.96
7.1.210.0060.00613.70
7.1.200.0080.00813.69
7.1.190.0150.00613.89
7.1.180.1000.01313.69
7.1.170.0530.00013.62
7.1.160.0900.01114.00
7.1.150.0630.01013.78
7.1.140.1090.01413.89
7.1.130.0140.00313.78
7.1.120.0350.01013.75
7.1.110.0050.01513.71
7.1.100.1320.00313.89
7.1.90.1160.00913.84
7.1.80.0140.00613.59
7.1.70.0120.00713.76
7.1.60.0470.01031.61
7.1.50.0300.00931.31
7.1.40.0330.01031.70
7.1.30.0540.01131.32
7.1.20.0280.00731.34
7.1.10.1660.00713.62
7.1.00.0440.00313.45
5.6.380.0060.00913.77

preferences:
61.54 ms | 400 KiB | 5 Q