3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo '<table border="1"><tr>'; foreach(range(1,20) as $key => $row) { echo '<td>'. $row . '</td>'; if(++$key % 5 == 0 ) echo '</tr><tr>'; } echo '</td></table>';
Output for 4.3.0 - 7.1.0
<table border="1"><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr><tr><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td></tr><tr><td>16</td><td>17</td><td>18</td><td>19</td><td>20</td></tr><tr></td></table>