3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('NULL','hello world'); $a; if($a==NULL){ echo 'ok'; }else{ echo 'bad'; } ?>
Output for 5.1.3 - 7.1.0
Notice: Undefined variable: a in /in/LHnRr on line 4 ok
Output for 5.1.0 - 5.1.2
Notice: Undefined variable: a in /in/LHnRr on line 4 bad
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: a in /in/LHnRr on line 3 Notice: Undefined variable: a in /in/LHnRr on line 4 bad
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: a in /in/LHnRr on line 3 Notice: Undefined variable: a in /in/LHnRr on line 4 bad