<?php
function a () {
function b() {
echo "I am ".__FUNCTION__."\n";
}
echo "I am ".__FUNCTION__."\n";
}
echo function_exists("b") ? "b is defined\n" : "b is not defined\n";
a();
echo function_exists("b") ? "b is defined\n" : "b is not defined\n";
b();