3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rows = 4; echo '<table><tr>'; for($i = 0; $i < 10; $i++){ echo '<td>' . $i . '</td>'; if(($i + 1) % $rows == 0){ echo '</tr><tr>'; } } echo '</tr></table>';
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<table><tr><td>0</td><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td><td>7</td></tr><tr><td>8</td><td>9</td></tr></table>