lest assume that i have the following
function a(){ function b(){} } a(); //pass a(); //error
why in the second call an exception is thr
It's because you're calling a() in a global scope. Add a function_exists call to make the above code work, but really there are few scenarios where you should really do something like this.
a()