title: PHP: Function execution time for debugging
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/21133/simplest-way-to-profile-a-php-script">Simplest way to profile a PHP script</a>  </p>
  </blockquote>
  
  
  
  <p>Sometimes my website loads slowly and I would like to trace which function causes it. (or if it is related to me or the webserver)
  How can I get execution times of each function that is being run?</p>
  
  <p>Like;</p>
  
  <pre><code>&lt;?php
  function A() { }
  function B() { }
  function C() { }
  A();
  B();
  
  Trace();
  ?&gt;
  </code></pre>
  
  <p>Trace() would output: A ran in 0,1 miliseconds, B ran in 1,1 seconds, script completed.
  Is there any debugging feature like this in PHP?</p>
  
  <p>Ps. I'm not speaking about applying microtime for each function.</p>