3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x=5;/* this multiline comment */ $y=10; //this is global echo $y; echo '<br>'; function add(){ $z=11; echo $z; } add(); echo "variable z is: $z";
based on 4l32Q
Output for 5.0.4 - 7.1.0
10<br>11 Notice: Undefined variable: z in /in/QJ0AC on line 11 variable z is:
Output for 4.3.0 - 5.0.3
10<br>11 Notice: Undefined variable: z in /in/QJ0AC on line 11 variable z is: