开发者

execute something on every function call php

Whenever any function invocation happens in PHP, I want to log the function name, its arguments and time of invocation. I开发者_如何学Gos there any means to achieve this. I have a function to log, how to set this function to execute each time any function invocation happens?


Use a profiler. Check out Xdebug. http://xdebug.org/


The best way you can do this is to call the log recording function from each of the other functions. Or else you can use a profiler as said by Adam

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜