Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
2  
Forgive me if I'm totally out of whack, but surely Apache doesn't execute any PHP functions? It passes the entire file to PHP to be processed. –  Dan Dec 20 '11 at 11:02
    
mod_php executes them,... well thats partly apache and partly php :) –  Kai Dec 20 '11 at 11:29
add comment

1 Answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.