3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('TRUE', false); if(TRUE) echo 'Ano'; else echo 'Ne'; $constants = get_defined_constants(true); foreach ($constants as $key => $values) { foreach ($values as $key2 => $val) { if ($key2 == 'TRUE') { echo "$key\n"; } } }
based on 1u1S6
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
AnoCore user
Output for hhvm-3.10.0 - 3.12.0
Notice: Constant TRUE already defined in /in/VC0q9 on line 2 Ano Warning: Invalid argument supplied for foreach() in /in/VC0q9 on line 13 Core
Output for 5.1.3 - 5.2.17
Anointernal user
Output for 5.0.0 - 5.1.2
Neinternal user
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
Ne Warning: Wrong parameter count for get_defined_constants() in /in/VC0q9 on line 7 Warning: Invalid argument supplied for foreach() in /in/VC0q9 on line 8
Output for 4.3.11
Ne Warning: Wrong parameter count for get_defined_constants() in /in/VC0q9 on line 7