3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rows = 10; $cols = 10; echo "<table border=\"1\">"; echo('<tr>'); for ($r =1; $r <= $cols; $r++){ echo("<td>.$r.</td>"); } echo('</tr>'); for($s = 1,$r=1;$s<=rows;$s++){ echo("<tr>"); if($r==1){ echo"<td>$s</td>"; } while($r<=10){ echo'<td>'.$s*$r++.'</td>'; } echo"</tr>"; $r=1;}
Output for 7.2.0 - 7.3.0rc6
<table border="1"><tr><td>.1.</td><td>.2.</td><td>.3.</td><td>.4.</td><td>.5.</td><td>.6.</td><td>.7.</td><td>.8.</td><td>.9.</td><td>.10.</td></tr> Warning: Use of undefined constant rows - assumed 'rows' (this will throw an Error in a future version of PHP) in /in/YGSqF on line 11
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.20
<table border="1"><tr><td>.1.</td><td>.2.</td><td>.3.</td><td>.4.</td><td>.5.</td><td>.6.</td><td>.7.</td><td>.8.</td><td>.9.</td><td>.10.</td></tr> Notice: Use of undefined constant rows - assumed 'rows' in /in/YGSqF on line 11