title: How to Calculate the Execution Time of Code While Compiling?
body: <p>I am trying to calculate the total time it will take for the code to run completely. I want to so the time in the page, so I can display a countdown timer.</p>
  
  <p><strong>MyCode :</strong></p>
  
  <pre><code>&lt;?php
      for($i=0;$i&lt;100000;$i++){
          echo "".$i."&lt;br&gt;";
      }
  ?&gt;
  </code></pre>
  
  <p>This is the above PHP code, here I want to get the time while running the script in the browser. If I can get the time of execution before compiling the full code, then I can show a timer in the page.</p>