I have some classes:
class A
{
   private $_method;
   public function __construct()
   {
       $this->_method = new B();
   }
   public function demo()
   {
     $this->_method->getNameFnc();
   }
}
class B
{
   public function getNameFnc()
   {
     echo __METHOD__;
   }
}
I'm trying to get the function name of a class B class, but I want the function getNameFnc to return 'demo'. How do I get the name 'demo' in function getNameFnc of class B?
 
     
     
     
    