title: In php, when will a inline <script> be resolved?
body: <p>I try to debug my slow php script submitting a query to several databases and several tables creating one resulting page.</p>
  
  <p>In the php script I put in like this in the start:</p>
  
  <pre><code>echo '&lt;script&gt;console.log("Start ",Date.now());&lt;/script&gt;';
  </code></pre>
  
  <p>taken from <a href="https://stackoverflow.com/questions/4323411/how-can-i-write-to-console-in-php">How can I write to console in PHP?</a></p>
  
  <p>And similar at the end of the php script.</p>
  
  <p>But as it takes from 30s to 1 minute before I get the resulting page, the time difference from the start to end of the script printed in the firebug console is less than a second.</p>
  
  <p>Like this:</p>
  
  <p>Start 1460618023753</p>
  
  <p>End   1460618023923</p>
  
  <p>So I think I'm misunderstanding when these  inlines actually are run.</p>
  
  <p>Can someone explain why this is so? And maybe suggest how I can, in principle, debug slow parts of my php code?</p>