3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $constants = get_defined_constants(true); $json_errors = array(); foreach ($constants as $name => $value) { if (!strncmp($name, "JSON_ERROR_", 11)) { $json_errors[$value] = $name; } } var_dump($json_errors);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(0) { }
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
Warning: Wrong parameter count for get_defined_constants() in /in/DKCWg on line 2 Warning: Invalid argument supplied for foreach() in /in/DKCWg on line 4 array(0) { }
Output for 4.3.11
Warning: Wrong parameter count for get_defined_constants() in /in/DKCWg on line 2 array(0) { }