3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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>"; ?>
based on su2UM
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.4.11 - 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.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /in/A4KIs on line 11
Process exited with code 255.