3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 7.2.0
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.3.18 - 7.1.10
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