3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 2; function incr(){ return $a++; } echo $a; echo incr(); ?>
Output for 5.0.4 - 7.1.0
2 Notice: Undefined variable: a in /in/4WT05 on line 5
Output for 4.3.0 - 5.0.3
2 Notice: Undefined variable: a in /in/4WT05 on line 5