3v4l.org

run code in 300+ PHP versions simultaneously
<?php <!DOCTYPE HTML> <html> <head> <meta charset = "utf-8"> <title>checkerboard</title> </head> <body> <table width="300px" cellspacing="1px" cellpadding="1px" border="1px"> <?php for($i=1; $i<=8;$i++){ echo "<tr>"; for($j=1;$j<=8;$j++){ echo "<td></td>"; if($i % 2==0){ echo '<td style="background-color:black; width:35px; height:35px"></td>'; echo '<td style="background-color:red; width:35px; height:35px"></td>'; } else{ echo '<td style="background-color:red; width:35px; height:35px"></td>'; echo '<td style="background-color:black; width:35px; height:35px"></td>'; } } echo "</tr>"; } ?> </table> </body> </html>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected '<', expecting end of file in /in/R6PW2 on line 2
Process exited with code 255.

preferences:
184.73 ms | 1395 KiB | 36 Q