lest assume that i have the following
function a(){ function b(){} } a(); //pass a(); //error
why in the second call an exception is thr
Declaring a function within another function like that would be considered bad practice in php. If you really need a function inside a() you should create a closure.
function a() { $b = function() { }; }