3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('DEFINED_LOWER', '1.3.0.0'); define('DEFINED_HIGHER', '1.6.0.0'); $version = 1.4; var_dump ( version_compare(DEFINED_HIGHER, $version, '<')); var_dump ( version_compare(NOT_DEFINED, $version, '<')); var_dump ( version_compare(DEFINED_LOWER, $version, '<')); var_dump ( version_compare(NOT_DEFINED, $version, '<'));
based on K3VQF
Output for 7.2.0
bool(false) Warning: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' (this will throw an Error in a future version of PHP) in /in/JSZq7 on line 8 bool(true) bool(true) Warning: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' (this will throw an Error in a future version of PHP) in /in/JSZq7 on line 11 bool(true)
Output for 5.3.18 - 7.1.10
bool(false) Notice: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' in /in/JSZq7 on line 8 bool(true) bool(true) Notice: Use of undefined constant NOT_DEFINED - assumed 'NOT_DEFINED' in /in/JSZq7 on line 11 bool(true)