3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result = json_decode('[ "DE": 2640 ]'); switch(json_last_error()) { case JSON_ERROR_DEPTH: echo ' - Maximale Stacktiefe überschritten'; break; case JSON_ERROR_CTRL_CHAR: echo ' - Unerwartetes Steuerzeichen gefunden'; break; case JSON_ERROR_SYNTAX: echo ' - Syntaxfehler, ungültiges JSON'; break; case JSON_ERROR_NONE: echo ' - Keine Fehler'; break; } echo PHP_EOL; var_export($result);
Output for 5.3.0 - 7.1.0
- Syntaxfehler, ungültiges JSON NULL
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined function json_last_error() in /in/QsgUV on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/QsgUV on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/QsgUV on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/QsgUV on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/QsgUV on line 2