performance - PHP Hook Function -


can like:

register_function_hook('myfunctionhook'); 

so when function run:

functiona(); //the hook runs myfunctionhook(); anoterfunction(); //the hook runs myfunctionhook(); class::functiona(); //the hook runs myfunctionhook(); 

does such thing exist?

-- edit --

what want breakdown of durations of each function. ie. performance tuning. want idea of takes time without installing xdebug on apache server, don't know if possible.

no, not possible way like

but can achieve close inheritance.

 class vehicle {        function __construct() {               $this->hookfunction();        }         function hookfunction() {               //        }  }   class car extends vehicle {   }    class toyota extends car {   }   new toyota(); // hook function  // exclude static call member functions, or other inline functions. 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -