Possible Duplicate:
Simplest way to profile a PHP script
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?
Like;
<?php
function A() { }
function B() { }
function C() { }
A();
B();
Trace();
?>
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?
Ps. I’m not speaking about applying microtime for each function.
Use:
Don’t use:
PS: My personal recommendation: Play with them all if you have the time to do so, or just set up xdebug in your dev environment otherwise.