<?php function f1() { $first = 10; function f2() { $second = $first + 10; return $second; } $t = f2(); return $t; } var_dump(f1());
Standard input is empty
int(10)
PHP Notice: Undefined variable: first in /home/la7rq7/prog.php on line 7
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!