How to log usage of built-in functions in PHP?

58 views Asked by At

Consider a built in php function, for example file_put_contents(). Running php-fpm on Nginx is it possible to log all usages of that function?

The example output i'm thinking about is something like this:

timestamp path_to_the_file_which_used_the_function  parameters_passed_to_the_function
1

There are 1 answers

0
Quolonel Questions On

Enable profiling in Xdebug. This logs many times each function is called, execution time and call stack. It may not show parameters passed, however.