3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DEFINED', '1.3.0.0'); $version = '1.6.1.1'; print ( version_compare(DEFINED, $version, '>')); print ( version_compare(NOT_DEFINED, $version, '>')); print ( version_compare(DEFINED, $version, '<')); print ( version_compare(NOT_DEFINED, $version, '<'));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "NOT_DEFINED" in /in/aWVbH:7 Stack trace: #0 {main} thrown in /in/aWVbH on line 7
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' (this will throw an Error in a future version of PHP) in /in/aWVbH on line 7 1 Warning: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' (this will throw an Error in a future version of PHP) in /in/aWVbH on line 10 1
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
Notice: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' in /in/aWVbH on line 7 1 Notice: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' in /in/aWVbH on line 10 1

preferences:
162.61 ms | 403 KiB | 226 Q