3v4l.org

run code in 500+ PHP versions simultaneously
<?php $fixtures = [ // Not valid 'foo', '{foo: bar}', "'{'foo': 'bar'}", '{...}', // Valid '"foo"', '1', '{"foo": "bar"}', ]; foreach ($fixtures as $string) { if (json_validate($string)) { echo sprintf('YES, >%s< is a valid JSON string', $string).PHP_EOL; echo 'decoded: '. var_export(json_decode($string), true).PHP_EOL; } else { echo sprintf('NO, >%s< is NOT a valid JSON string: %s', $string, json_last_error_msg()). PHP_EOL; } }

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.5.70.0120.00616.68
8.5.60.0040.00416.69
8.5.50.0090.00616.61
8.5.30.0130.00419.56
8.5.20.0130.00620.06
8.5.10.0130.00716.62
8.5.00.0120.00920.03
8.4.220.0060.00319.47
8.4.210.0100.01319.42
8.4.180.0100.01222.04
8.4.170.0110.01220.35
8.4.160.0090.01622.32
8.4.150.0100.00416.74
8.4.140.0130.01217.25
8.4.130.0130.00719.66
8.4.120.0110.00820.66
8.4.110.0050.00422.65
8.4.100.0120.00818.50
8.4.90.0120.00919.00
8.4.80.0040.00418.93
8.4.70.0090.01218.00
8.4.60.0110.01218.64
8.4.50.0080.00820.41
8.4.40.0080.00017.75
8.4.30.0070.01318.72
8.4.20.0160.00319.64
8.4.10.0130.00719.46
8.3.310.0120.00918.34
8.3.300.0090.01020.66
8.3.290.0140.00920.96
8.3.280.0150.00818.52
8.3.270.0120.00716.77
8.3.260.0110.00916.68
8.3.250.0130.00618.78
8.3.240.0100.00816.98
8.3.230.0050.00316.59
8.3.220.0110.00518.84
8.3.210.0100.00916.85
8.3.200.0070.01216.48
8.3.190.0060.00717.22
8.3.180.0110.00918.39
8.3.170.0090.00920.84
8.3.160.0100.00717.11
8.3.150.0090.00917.15
8.3.140.0040.00417.20
8.3.130.0030.00518.31
8.3.120.0070.00319.00
8.3.110.0130.00620.94
8.3.100.0060.00918.03
8.3.90.0040.00418.31
8.3.80.0000.00919.36
8.3.70.0110.01116.58
8.3.60.0070.01416.62
8.3.50.0120.00618.45
8.3.40.0070.00722.04
8.3.30.0110.00420.18
8.3.20.0110.00923.48
8.3.10.0120.00621.75
8.2.300.0110.00924.11
8.2.290.0070.00820.56
8.2.280.0150.00420.07
8.2.270.0070.01119.09
8.2.260.0080.00016.74
8.2.250.0040.00416.82
8.2.240.0090.00017.30
8.2.230.0000.00922.58
8.2.220.0070.00724.06
8.2.210.0040.00426.77
8.2.200.0070.00316.50
8.2.190.0120.00316.88
8.2.180.0170.00316.88
8.2.170.0060.00818.96
8.2.160.0100.00722.96
8.2.150.0120.00322.96
8.2.140.0100.00722.96
8.1.340.0140.00617.75
8.1.330.0060.00921.87
8.1.320.0100.00916.29
8.1.310.0140.00318.18
8.1.300.0050.00517.89
8.1.290.0090.00318.88
8.1.280.0090.00925.92
8.1.270.0100.00322.96

preferences:
75.88 ms | 858 KiB | 5 Q