3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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> ?>
based on R6PW2
Output for 7.0.0 - 7.1.7
Parse error: syntax error, unexpected '<', expecting end of file in /in/Xj3Wv on line 2
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected '<', expecting $end in /in/Xj3Wv:2 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '<' in /in/Xj3Wv on line 2
Process exited with code 255.