3v4l.org

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