Tracking PHP function calls using php-cpp

108 views Asked by At

I am writing a PHP extension using php-cpp to help me profile my code.

Is there any way in php-cpp to track all calls to a specific function without modifying my php?

e.g. track all calls to json_encode() and get the arguments being passed to it?

Like javascript, maybe can I register a callback function on the event of a json_encode call? just groping in the dark here

Would be great if someone who has experience with php-cpp can point in the right direction.

Cheers!

0

There are 0 answers