3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach (array('JSON_PRETTY_PRINT', 'JSON_UNESCAPED_SLASHES', 'JSON_UNESCAPED_UNICODE') as $const) { echo 'define(\'', $const, '\', ', constant($const), ");\n"; }
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
define('JSON_PRETTY_PRINT', 128); define('JSON_UNESCAPED_SLASHES', 64); define('JSON_UNESCAPED_UNICODE', 256);
Output for 4.3.2 - 5.3.29
define('JSON_PRETTY_PRINT', Warning: constant(): Couldn't find constant JSON_PRETTY_PRINT in /in/Xudrf on line 4 ); define('JSON_UNESCAPED_SLASHES', Warning: constant(): Couldn't find constant JSON_UNESCAPED_SLASHES in /in/Xudrf on line 4 ); define('JSON_UNESCAPED_UNICODE', Warning: constant(): Couldn't find constant JSON_UNESCAPED_UNICODE in /in/Xudrf on line 4 );
Output for 4.3.0 - 4.3.1
define('JSON_PRETTY_PRINT', Warning: constant() [http://www.php.net/function.constant]: Couldn't find constant JSON_PRETTY_PRINT in /in/Xudrf on line 4 ); define('JSON_UNESCAPED_SLASHES', Warning: constant() [http://www.php.net/function.constant]: Couldn't find constant JSON_UNESCAPED_SLASHES in /in/Xudrf on line 4 ); define('JSON_UNESCAPED_UNICODE', Warning: constant() [http://www.php.net/function.constant]: Couldn't find constant JSON_UNESCAPED_UNICODE in /in/Xudrf on line 4 );