3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define("true", false); if (true) { echo "TRUE"; } else { echo "FALSE"; } echo "\nNow define TRUE..\n"; define("TRUE", false); if (TRUE) { echo "TRUE"; } else { echo "FALSE"; }
Output for 5.5.0 - 5.6.21, 7.0.0 - 7.1.0
Notice: Constant true already defined in /in/ouSSR on line 3 TRUE Now define TRUE.. TRUE
Output for hhvm-3.10.0 - 3.12.0
Notice: Constant true already defined in /in/ouSSR on line 3 TRUE Now define TRUE.. Notice: Constant TRUE already defined in /in/ouSSR on line 12 TRUE
Output for 5.1.3 - 5.4.45
TRUE Now define TRUE.. TRUE
Output for 4.3.0 - 5.1.2
TRUE Now define TRUE.. FALSE