3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(defined('JSON_C_VERSION') ? JSON_C_VERSION : NULL); var_dump(PHP_INT_SIZE); echo "JSON_BIGINT_AS_STRING:\n"; var_dump(json_decode('[12345678901234567890]', TRUE, 512, JSON_BIGINT_AS_STRING)); var_dump(json_last_error()); var_dump(PHP_VERSION_ID >= 50500 ? json_last_error_msg() : '?'); echo "Invalid UTF-8 input:\n"; var_dump(json_decode("\"\xff\"")); var_dump(json_last_error()); var_dump(PHP_VERSION_ID >= 50500 ? json_last_error_msg() : '?'); echo "Valid UTF-8 input, but the result can not be (lead surrogate followed by lead surrogate):\n"; var_dump(json_decode('"\uD811\uD811"')); var_dump(json_last_error()); var_dump(PHP_VERSION_ID >= 50500 ? json_last_error_msg() : '?'); echo "Fatal error:\n"; var_dump(json_decode('{"\u0000": 1}')); var_dump(json_last_error()); var_dump(PHP_VERSION_ID >= 50500 ? json_last_error_msg() : '?');
Output for git.master, git.master_jit, rfc.property-hooks
NULL int(8) JSON_BIGINT_AS_STRING: array(1) { [0]=> string(20) "12345678901234567890" } int(0) string(8) "No error" Invalid UTF-8 input: NULL int(5) string(56) "Malformed UTF-8 characters, possibly incorrectly encoded" Valid UTF-8 input, but the result can not be (lead surrogate followed by lead surrogate): NULL int(10) string(50) "Single unpaired UTF-16 surrogate in unicode escape" Fatal error: NULL int(9) string(36) "The decoded property name is invalid"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.77 ms | 402 KiB | 8 Q