3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bagel_price = 2.25; echo "<table border=\"1\" align=\"center\">"; echo "<tr><th>Quantity</th>"; echo "<th>Price</th></tr>"; for ( $counter = 1; $counter <= 20; $counter += 1) { echo "<tr><td>"; echo $counter; echo "</td><td>"; echo $ bagel_price * $counter; echo "</td></tr>"; } echo "</table>"; ?>
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'bagel_price' (T_STRING), expecting variable (T_VARIABLE) or '{' or '$' in /in/A4KIs on line 11
Process exited with code 255.
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17
Parse error: syntax error, unexpected 'bagel_price' (T_STRING), expecting variable (T_VARIABLE) or '$' in /in/A4KIs on line 11
Process exited with code 255.

preferences:
170.18 ms | 1395 KiB | 28 Q