title: PHP: trace script process flow
body: <p>Is it possible within a PHP script to start a trace log and activate a debugging log.
  I am not looking for eclipse + xdebug, but something like this use-case:
  When script starts, it checks if <code>$_GET[&quot;debugme&quot;]</code> is set. If yes, say <code>start_trace_log()</code>.
  Anything that happens after that in the rest of the script, should be logged, e.g.</p>
  <blockquote>
  <p>scriptA.php :10 include(&quot;anotherscript.php&quot;)</p>
  <p>anotherscript.php:1 foo()</p>
  <p>...</p>
  </blockquote>
  <p>At the moment, I have to manually do this for any script that i am interested to log and everywhere the script has to check <code>$_GET[&quot;debugme&quot;]</code> instead of simply debugging ALL within this script run. Very uncomfortable for ocassionally checking scripts.</p>
  <p>Any better ideas or comfortable ways of tracing php scripts from a start point to the last line?</p>