3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = range(1,100); $i = 0; $total = count($array); for ($i = 0; $i < $total; $i++) { echo '<div class="row">'; for ($e = $i; $e < $i + 3 && $e < $total; $e++) { echo $array[$e]; } echo '</div>'; }
Output for 4.3.0 - 7.1.0
<div class="row">123</div><div class="row">234</div><div class="row">345</div><div class="row">456</div><div class="row">567</div><div class="row">678</div><div class="row">789</div><div class="row">8910</div><div class="row">91011</div><div class="row">101112</div><div class="row">111213</div><div class="row">121314</div><div class="row">131415</div><div class="row">141516</div><div class="row">151617</div><div class="row">161718</div><div class="row">171819</div><div class="row">181920</div><div class="row">192021</div><div class="row">202122</div><div class="row">212223</div><div class="row">222324</div><div class="row">232425</div><div class="row">242526</div><div class="row">252627</div><div class="row">262728</div><div class="row">272829</div><div class="row">282930</div><div class="row">293031</div><div class="row">303132</div><div class="row">313233</div><div class="row">323334</div><div class="row">333435</div><div class="row">343536</div><div class="row">353637</div><div class="row">363738</div><div class="row">373839</div><div class="row">383940</div><div class="row">394041</div><div class="row">404142</div><div class="row">414243</div><div class="row">424344</div><div class="row">434445</div><div class="row">444546</div><div class="row">454647</div><div class="row">464748</div><div class="row">474849</div><div class="row">484950</div><div class="row">495051</div><div class="row">505152</div><div class="row">515253</div><div class="row">525354</div><div class="row">535455</div><div class="row">545556</div><div class="row">555657</div><div class="row">565758</div><div class="row">575859</div><div class="row">585960</div><div class="row">596061</div><div class="row">606162</div><div class="row">616263</div><div class="row">626364</div><div class="row">636465</div><div class="row">646566</div><div class="row">656667</div><div class="row">666768</div><div class="row">676869</div><div class="row">686970</div><div class="row">697071</div><div class="row">707172</div><div class="row">717273</div><div class="row">727374</div><div class="row">737475</div><div class="row">747576</div><div class="row">757677</div><div class="row">767778</div><div class="row">777879</div><div class="row">787980</div><div class="row">798081</div><div class="row">808182</div><div class="row">818283</div><div class="row">828384</div><div class="row">838485</div><div class="row">848586</div><div class="row">858687</div><div class="row">868788</div><div class="row">878889</div><div class="row">888990</div><div class="row">899091</div><div class="row">909192</div><div class="row">919293</div><div class="row">929394</div><div class="row">939495</div><div class="row">949596</div><div class="row">959697</div><div class="row">969798</div><div class="row">979899</div><div class="row">9899100</div><div class="row">99100</div><div class="row">100</div>