3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define(TRUE, false); define(FALSE, true); var_dump(true); var_dump(TRUE); var_dump(constant('TRUE')); var_dump(constant('true')); var_dump( true === TRUE ); echo constant("TEST");
Output for 4.3.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(true) bool(true) bool(true) bool(true) bool(true) Warning: constant(): Couldn't find constant TEST in /in/iLnRd on line 11
Output for 4.3.0 - 4.3.1
bool(true) bool(true) bool(true) bool(true) bool(true) Warning: constant() [http://www.php.net/function.constant]: Couldn't find constant TEST in /in/iLnRd on line 11