My PHP script to use this object now looks like this:
$timer = new PHP_timer;
and will return to me something like:
Script execution debug information:
here be marker 1
I've intended this script to be a quick and easy way for programmers to debug lock ups
and timing problems in their scripts. Therefore I haven't included any error checking
code. Also use a bit of common sense about where you put markers in your code - inside
a loop that is iterating through a database is probably not a good idea. Once before
and one after the loop would be a better idea.
I have started working on some ways of improving the debug information and output with
graphs and being able to nest or group markers, but this should be a start on debugging your scripts.