Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. Is 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?

like image 764
Kartins Avatar asked Oct 12 '11 06:10

Kartins


1 Answers

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

like image 101
Adam Trachtenberg Avatar answered Oct 16 '22 21:10

Adam Trachtenberg