Is it possible?
function test() { echo \"function name is test\"; }
The accurate way is to use the __FUNCTION__ predefined magic constant.
__FUNCTION__
Example:
class Test { function MethodA(){ echo __FUNCTION__; } }
Result: MethodA.
MethodA