title: Which loop is faster, while or for?
body: <p>You can get the same output with for and while loops:</p>
  
  <p><strong>While:</strong></p>
  
  <pre><code>$i = 0;
  while ($i &lt;= 10){
    print $i."\n";
    $i++;
  };
  </code></pre>
  
  <p><strong>For:</strong></p>
  
  <pre><code>for ($i = 0; $i &lt;= 10; $i++){
    print $i."\n";
  }
  </code></pre>
  
  <p>But which one is faster?</p>