3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 1; function f1() { $b = 2; function f2() { var_dump($a, $b); } f2(); } f1();
Output for 5.0.4 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined variable: a in /in/HlatM on line 8 Notice: Undefined variable: b in /in/HlatM on line 8 NULL NULL
Output for hhvm-3.12.0
Notice: Undefined variable: a in /in/HlatM on line -1 Notice: Undefined variable: b in /in/HlatM on line -1 NULL NULL
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: a in /in/HlatM on line 8 Notice: Undefined variable: b in /in/HlatM on line 8 NULL NULL