3v4l.org

run code in 300+ PHP versions simultaneously
<?php $constants = get_defined_constants(true); $json_errors = array(); foreach ($constants["json"] as $name => $value) { if (!strncmp($name, "JSON_ERROR_", 11)) { $json_errors[$value] = $name; } } var_dump($json_errors);
Output for git.master, git.master_jit, rfc.property-hooks
array(12) { [0]=> string(15) "JSON_ERROR_NONE" [1]=> string(16) "JSON_ERROR_DEPTH" [2]=> string(25) "JSON_ERROR_STATE_MISMATCH" [3]=> string(20) "JSON_ERROR_CTRL_CHAR" [4]=> string(17) "JSON_ERROR_SYNTAX" [5]=> string(15) "JSON_ERROR_UTF8" [6]=> string(20) "JSON_ERROR_RECURSION" [7]=> string(21) "JSON_ERROR_INF_OR_NAN" [8]=> string(27) "JSON_ERROR_UNSUPPORTED_TYPE" [9]=> string(32) "JSON_ERROR_INVALID_PROPERTY_NAME" [10]=> string(16) "JSON_ERROR_UTF16" [11]=> string(26) "JSON_ERROR_NON_BACKED_ENUM" }

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:
48.67 ms | 402 KiB | 8 Q