3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <body> <?php $state=array ( array('Alabama', 'Montgomery', 4779736, 23), array('Alaska', 'Juneau', 710231, 47), array('Arizona', 'Phoenix', 6329017, 18), array('Arkansas', 'LittleRock', 2915918, 32), array('California', 'Sacramento', 37253956, 1), array('Colorado', 'Denver', 5029196, 22), array('Connecticut', 'Hartford', 3518288, 29), array('Delaware', 'Dover', 897934, 45), array('Florida', 'Tallahassee', 18801310, 4), array('Georgia', 'Atlanta', 9687653, 9), array('Hawaii', 'Boise', 1360301, 42) ); echo "<table border=\"5\" cellpadding=\"10\">"; echo'<tr>'; echo('<th>' . State. '</th>'); echo('<th>' . Capital. '</th>'); echo('<th>' . Population. '</th>'); echo('<th>' . Rank. '</th>'); echo'</tr>'; for ($i=0; $i<11; $i++) {echo('<tr>'); for ($j=0; $j<4; $j++) {echo ('<td>' . $state[$i][$j] . '</td>'); } echo('</tr>'); } echo "</table>" ?> </body> </html>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<!DOCTYPE html> <html> <body> <table border="5" cellpadding="10"><tr> Notice: Use of undefined constant State - assumed 'State' in /in/0pL1O on line 22 <th>State</th> Notice: Use of undefined constant Capital - assumed 'Capital' in /in/0pL1O on line 23 <th>Capital</th> Notice: Use of undefined constant Population - assumed 'Population' in /in/0pL1O on line 24 <th>Population</th> Notice: Use of undefined constant Rank - assumed 'Rank' in /in/0pL1O on line 25 <th>Rank</th></tr><tr><td>Alabama</td><td>Montgomery</td><td>4779736</td><td>23</td></tr><tr><td>Alaska</td><td>Juneau</td><td>710231</td><td>47</td></tr><tr><td>Arizona</td><td>Phoenix</td><td>6329017</td><td>18</td></tr><tr><td>Arkansas</td><td>LittleRock</td><td>2915918</td><td>32</td></tr><tr><td>California</td><td>Sacramento</td><td>37253956</td><td>1</td></tr><tr><td>Colorado</td><td>Denver</td><td>5029196</td><td>22</td></tr><tr><td>Connecticut</td><td>Hartford</td><td>3518288</td><td>29</td></tr><tr><td>Delaware</td><td>Dover</td><td>897934</td><td>45</td></tr><tr><td>Florida</td><td>Tallahassee</td><td>18801310</td><td>4</td></tr><tr><td>Georgia</td><td>Atlanta</td><td>9687653</td><td>9</td></tr><tr><td>Hawaii</td><td>Boise</td><td>1360301</td><td>42</td></tr></table></body> </html>