3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('NULL','hello world'); define('True','hello world'); var_dump(True); var_dump(NULL); $a; if($a==NULL){ echo 'ok'; }else{ echo 'bad'; } ?>
Output for 5.1.3 - 5.6.28, 7.0.0 - 7.1.0
bool(true) NULL Notice: Undefined variable: a in /in/iURuu on line 7 ok
Output for hhvm-3.10.0 - 3.13.2
Notice: Constant NULL already defined in /in/iURuu on line 2 bool(true) NULL Notice: Undefined variable: a in /in/iURuu on line 6 Notice: Undefined variable: a in /in/iURuu on line 7 ok
Output for 5.1.0 - 5.1.2
string(11) "hello world" string(11) "hello world" Notice: Undefined variable: a in /in/iURuu on line 7 bad
Output for 5.0.4 - 5.0.5
string(11) "hello world" string(11) "hello world" Notice: Undefined variable: a in /in/iURuu on line 6 Notice: Undefined variable: a in /in/iURuu on line 7 bad
Output for 4.3.0 - 5.0.3
string(11) "hello world" string(11) "hello world" Notice: Undefined variable: a in /in/iURuu on line 6 Notice: Undefined variable: a in /in/iURuu on line 7 bad