Is it possible?
function test()
{
echo "function name is test";
}
Is it possible?
function test()
{
echo "function name is test";
}
You can use the magic constants __METHOD__ or __FUNCTION__ depending on if it's a method or a function... =)
what i know
you can get all of the function you create
$arr = get_defined_functions();
will print [user] => Array ( [0] => functionname )
If you are using PHP5 you can try this:
function a()
{
$trace = debug_backtrace();
echo "Function name is " . $trace[0]["function"];
}