3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = 'invalid json test'; try { $array = json_decode($json, true, 512, JSON_THROW_ON_ERROR); printf('Valid JSON output: %s', print_r($array, true)); } catch (\JsonException $exception) { printf('Invalid JSON input: %s', print_r($exception, true)); }

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.0100.00318.05
8.3.50.0060.00816.27
8.3.40.0100.00718.82
8.3.30.0090.00618.84
8.3.20.0080.00022.66
8.3.10.0040.00420.30
8.3.00.0050.00321.91
8.2.180.0140.00718.36
8.2.170.0100.01022.96
8.2.160.0090.00622.31
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00619.32
8.2.110.0100.00021.04
8.2.100.0090.00317.90
8.2.90.0000.00919.23
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0050.00317.50
8.2.50.0040.00418.10
8.2.40.0050.00320.59
8.2.30.0000.00717.60
8.2.20.0000.00818.00
8.2.10.0050.00219.32
8.2.00.0000.00719.15
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.05
8.1.230.0080.00319.16
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0050.00317.23
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0000.00918.46
8.1.160.0050.00219.01
8.1.150.0030.00618.87
8.1.140.0040.00422.18
8.1.130.0040.00417.30
8.1.120.0100.00017.42
8.1.110.0040.00417.39
8.1.100.0000.00717.36
8.1.90.0000.00717.26
8.1.80.0000.00717.41
8.1.70.0000.00717.36
8.1.60.0070.00017.52
8.1.50.0110.00017.51
8.1.40.0000.00917.39
8.1.30.0000.00817.64
8.1.20.0030.00517.56
8.1.10.0050.00317.44
8.1.00.0000.00717.52
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00818.39
8.0.270.0040.00417.91
8.0.260.0040.00416.82
8.0.250.0070.00016.94
8.0.240.0000.00816.85
8.0.230.0030.00516.88
8.0.220.0040.00416.89
8.0.210.0030.00316.75
8.0.200.0030.00316.95
8.0.190.0040.00416.84
8.0.180.0000.00816.97
8.0.170.0040.00416.93
8.0.160.0030.00316.78
8.0.150.0000.01016.82
8.0.140.0040.00416.87
8.0.130.0050.00013.30
8.0.120.0050.00216.92
8.0.110.0000.00716.88
8.0.100.0000.00716.93
8.0.90.0000.00816.71
8.0.80.0070.00716.84
8.0.70.0080.00016.74
8.0.60.0040.00416.75
8.0.50.0040.00416.77
8.0.30.0100.00716.77
8.0.20.0060.01216.95
8.0.10.0020.00516.98
8.0.00.0100.00716.55
7.4.330.0000.00615.55
7.4.320.0040.00317.39
7.4.300.0000.00716.48
7.4.290.0040.00416.64
7.4.280.0060.00316.49
7.4.270.0030.00616.41
7.4.260.0030.00313.34
7.4.250.0000.00716.54
7.4.240.0030.00516.50
7.4.230.0000.00716.40
7.4.220.0030.00316.62
7.4.210.0110.00716.61
7.4.200.0030.00316.30
7.4.130.0140.00416.57
7.4.120.0060.01216.57
7.4.110.0070.01116.46
7.4.100.0130.01016.58
7.4.90.0030.01416.73
7.4.80.0090.00619.39
7.4.70.0080.00816.60
7.4.60.0060.01216.61
7.4.50.0130.00316.14
7.4.40.0040.01316.56
7.4.30.0130.00316.52
7.4.20.0060.00916.47
7.4.10.0160.00016.48
7.4.00.0070.01015.62
7.3.330.0030.00616.25
7.3.320.0030.00313.15
7.3.310.0040.00416.32
7.3.300.0000.00716.15
7.3.290.0060.00916.29
7.3.280.0080.00816.25
7.3.260.0130.00716.45
7.3.230.0000.01716.43
7.3.210.0040.01116.40
7.3.200.0040.01416.23
7.3.190.0150.00616.33
7.3.180.0090.00616.43
7.3.170.0060.00916.26
7.3.160.0060.00916.46
7.3.150.0150.00016.38
7.3.140.0070.01016.22
7.3.130.0150.00616.30
7.3.120.0120.00615.25
7.3.110.0040.01415.51
7.3.100.0090.00915.61
7.3.90.0070.01015.57
7.3.80.0090.00615.56
7.3.70.0060.01215.55
7.3.60.0120.00615.54
7.3.50.0030.01215.47
7.3.40.0060.01015.58
7.3.30.0090.00615.63
7.3.20.0280.00515.66
7.3.10.0070.00815.53
7.3.00.0130.00515.57
7.2.330.0080.00816.71
7.2.320.0150.00816.59
7.2.310.0110.00616.60
7.2.300.0070.01316.66
7.2.290.0100.00616.37
7.2.280.0070.01016.59
7.2.270.0030.01316.34
7.2.260.0070.01016.49
7.2.250.0140.00415.76
7.2.240.0060.01015.76
7.2.230.0100.00615.74
7.2.220.0050.01415.79
7.2.210.0080.01015.68
7.2.200.0080.00815.65
7.2.190.0120.00715.71
7.2.180.0060.01315.64
7.2.170.0050.01215.77
7.2.160.0100.00716.38
7.2.150.0110.00716.50
7.2.140.0160.00316.45
7.2.130.0100.00716.45
7.2.120.0110.00816.57
7.2.110.0100.01016.42
7.2.100.0120.00616.36
7.2.90.0080.00916.56
7.2.80.0130.01016.55
7.2.70.0070.01116.57
7.2.60.0030.01316.68
7.2.50.0070.01016.52
7.2.40.0040.01316.55
7.2.30.0030.01416.53
7.2.20.0150.00316.34
7.2.10.0070.01316.45
7.2.00.0120.00616.53
7.1.330.0030.01113.90
7.1.320.0120.00313.94
7.1.310.0070.00713.91
7.1.300.0060.00813.78
7.1.290.0060.00913.82
7.1.280.0030.01013.84
7.1.270.0090.00313.63
7.1.260.0060.01013.56

preferences:
72.72 ms | 400 KiB | 5 Q