for loop best practice
<p>As far as I know second and third expressions are executed every time in a for loop.</p>

<p>I always took for granted performance wise second option is recommended, can anyone confirm this?</p>

<p>1) <code>for($i=0;$i&lt;=dosomething();$i++) [...]</code></p>

<p>2)</p>

<pre><code> $max = dosomething();
 for($i=0;$i&lt;=$max;$i++) [...]
</code></pre>
