Php – Count specific php function calls executed by apache

apache-2.2mod-phpPHP

Is there a way to count how often apache executes a specific php function?

At the end I want I file like this:

  From 2012-01-01 till 2012-01-31 apache executed: 
  system() : 10
  printf() : 1000
  etc.

I hope you get the idea.

Edit:
Just to clarify things. I don't want to profile a specific php application/script. We have a shared hosting environment here and we are planning on shutting down a few php functions. Before we can do that, I would like to have an overview on how often these functions get called anyways. I don't have access to the code executed. I only can manipulate the apache (mod_php) config.

Related Topic