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"); echo defined();
Output for 5.3.0 - 5.6.28, 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/5TD9q on line 11 Warning: defined() expects exactly 1 parameter, 0 given in /in/5TD9q on line 12
Output for hhvm-3.10.0 - 3.12.0
bool(true) bool(true) bool(true) bool(true) bool(true) Warning: constant(): Couldn't find constant TEST in /in/5TD9q on line 11 Warning: defined() expects at least 1 parameter, 0 given in /in/5TD9q on line 12
Output for 4.3.2 - 5.2.17
bool(true) bool(true) bool(true) bool(true) bool(true) Warning: constant(): Couldn't find constant TEST in /in/5TD9q on line 11 Warning: Wrong parameter count for defined() in /in/5TD9q on line 12
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/5TD9q on line 11 Warning: Wrong parameter count for defined() in /in/5TD9q on line 12