3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result=range(1,5); $left=count($result); $colLeft=4; $limit=0; $i=0; foreach($result as $row) { echo if($i==0) { $limit=ceil($left/$colLeft); echo '<tr>'; } echo '<td>'.$row.'</td>'; $i++; $left--; if($i>=$limit) { echo '</tr>'; $i=0; $colLeft--; } }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'if' (T_IF) in /in/pssB1 on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_IF in /in/pssB1 on line 10
Process exited with code 255.

preferences:
185.84 ms | 1386 KiB | 67 Q