3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( JSON_ERROR_DEPTH, JSON_ERROR_STATE_MISMATCH, JSON_ERROR_CTRL_CHAR, JSON_ERROR_SYNTAX, JSON_ERROR_UTF8, JSON_ERROR_RECURSION, JSON_ERROR_INF_OR_NAN, JSON_ERROR_UNSUPPORTED_TYPE, JSON_ERROR_INVALID_PROPERTY_NAME, JSON_ERROR_UTF16 );
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 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.4, 8.3.6
int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) int(9) int(10)
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) int(9) int(10)
Output for 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Notice: Use of undefined constant JSON_ERROR_INVALID_PROPERTY_NAME - assumed 'JSON_ERROR_INVALID_PROPERTY_NAME' in /in/ZT9I2 on line 13 Notice: Use of undefined constant JSON_ERROR_UTF16 - assumed 'JSON_ERROR_UTF16' in /in/ZT9I2 on line 15 int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) string(32) "JSON_ERROR_INVALID_PROPERTY_NAME" string(16) "JSON_ERROR_UTF16"
Output for 5.4.1 - 5.4.45
Notice: Use of undefined constant JSON_ERROR_RECURSION - assumed 'JSON_ERROR_RECURSION' in /in/ZT9I2 on line 10 Notice: Use of undefined constant JSON_ERROR_INF_OR_NAN - assumed 'JSON_ERROR_INF_OR_NAN' in /in/ZT9I2 on line 11 Notice: Use of undefined constant JSON_ERROR_UNSUPPORTED_TYPE - assumed 'JSON_ERROR_UNSUPPORTED_TYPE' in /in/ZT9I2 on line 12 Notice: Use of undefined constant JSON_ERROR_INVALID_PROPERTY_NAME - assumed 'JSON_ERROR_INVALID_PROPERTY_NAME' in /in/ZT9I2 on line 13 Notice: Use of undefined constant JSON_ERROR_UTF16 - assumed 'JSON_ERROR_UTF16' in /in/ZT9I2 on line 15 int(1) int(2) int(3) int(4) int(5) string(20) "JSON_ERROR_RECURSION" string(21) "JSON_ERROR_INF_OR_NAN" string(27) "JSON_ERROR_UNSUPPORTED_TYPE" string(32) "JSON_ERROR_INVALID_PROPERTY_NAME" string(16) "JSON_ERROR_UTF16"

preferences:
229.57 ms | 403 KiB | 258 Q