3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('CONSTANT', ''); define('_CONSTANT', 0); define('EMPTY', ''); var_dump(CONSTANT); $a = '5'; if (!empty($a)) { if (!(boolean) _CONSTANT) { echo 1; } } else if (constant('CONSTANT') == 1) { echo 2; }
based on RZMla
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(0) "" 1