3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($day = 1; $day<= 31; ++$day) { print "\t<option value=\"$day\">$day</option>\n"; } ?> <html> <head><title>Month</title></head> <body> <p>Please enter your month of birth</p> <form action="dataEntry.php" method="post"> <table cellspacing="5"> <tr><td valign="middle"colspan=2> Month <!-- drop-down list for month --> <select name=month> <option selected="selected" value=""> no month </option> <option value="Jan">1</option> <option value="Feb">2</option> <option value="Mar">3</option> <option value="Apl">4</option> <option value="May">5</option> <option value="Jun">6</option> <option value="Jul">7</option> <option value="Aug">8</option> <option value="Sep">9</option> <option value="Oct">10</option> <option value="Nov">11</option> <option value="Dec">12</option> </select> </td></tr> </table> </form></body></html>
based on l9r9U
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
<option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> <html> <head><title>Month</title></head> <body> <p>Please enter your month of birth</p> <form action="dataEntry.php" method="post"> <table cellspacing="5"> <tr><td valign="middle"colspan=2> Month <!-- drop-down list for month --> <select name=month> <option selected="selected" value=""> no month </option> <option value="Jan">1</option> <option value="Feb">2</option> <option value="Mar">3</option> <option value="Apl">4</option> <option value="May">5</option> <option value="Jun">6</option> <option value="Jul">7</option> <option value="Aug">8</option> <option value="Sep">9</option> <option value="Oct">10</option> <option value="Nov">11</option> <option value="Dec">12</option> </select> </td></tr> </table> </form></body></html>