3v4l.org

run code in 300+ PHP versions simultaneously
<?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.4.45, 5.5.0 - 5.5.36, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
define('JSON_PRETTY_PRINT', 128); define('JSON_UNESCAPED_SLASHES', 64); define('JSON_UNESCAPED_UNICODE', 256);
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 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 );

preferences:
189.14 ms | 402 KiB | 348 Q