3v4l.org

run code in 300+ PHP versions simultaneously
<section> <form id="yearForm" name="yearForm" method="post" action=""> <label for="select_year">Select the year: </label> <?php // Sets the default year to be the current year. $current_year = date('Y'); // Year to start available options. $earliest_year = ($current_year - 5); // Set your latest year you want in the range. $latest_year = 2050; echo '<select>'; // Loops over each int[year] from current year, back to the $earliest_year [1950] foreach ( range( $earliest_year, $latest_year ) as $i ) { // Echos the option with the next year in range. echo '<option value="'.$i.'" '.($i == $current_year ? ' selected="selected"' : '').'>'.$i.'</option>'; } echo '</select>'; ?> </form> <br /> <br /> <form id="monthForm" name="monthForm" method="post" action=""> <label for="month">Select the month: </label> <!-- <input type=hidden id="month" name=month>--> <select id="month" name="month" > <option value='01'>January</option> <option value='02'>February</option> <option value='03'>March</option> <option value='04'>April</option> <option value='05'>May</option> <option value='06'>June</option> <option value='07'>July</option> <option value='08'>August</option> <option value='09'>September</option> <option value='10'>October</option> <option value='11'>November</option> <option value='12'>December</option> </select> <br /> <br /> <label for="whole_year">Show whole year: </label> <input type="checkbox" id="whole_year" name="whole_year" > <br /> <br /> <input type="submit" class=inline name="submitButton" id="submitButton" value="Submit" /> </form>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 28
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 28
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/k1P7T
function name:  (null)
number of ops:  32
compiled vars:  !0 = $current_year, !1 = $earliest_year, !2 = $latest_year, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Csection%3E%0A++++%3Cform+id%3D%22yearForm%22+name%3D%22yearForm%22+method%3D%22post%22+action%3D%22%22%3E%0A++++++++%3Clabel+for%3D%22select_year%22%3ESelect+the+year%3A+%3C%2Flabel%3E%0A++++++++'
    6     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y'
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    8     5        SUB                                              ~6      !0, 5
          6        ASSIGN                                                   !1, ~6
   10     7        ASSIGN                                                   !2, 2050
   12     8        ECHO                                                     '%3Cselect%3E'
   14     9        INIT_FCALL                                               'range'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13      > FE_RESET_R                                       $10     $9, ->28
         14    > > FE_FETCH_R                                               $10, !3, ->28
   16    15    >   CONCAT                                           ~11     '%3Coption+value%3D%22', !3
         16        CONCAT                                           ~12     ~11, '%22+'
         17        IS_EQUAL                                                 !3, !0
         18      > JMPZ                                                     ~13, ->21
         19    >   QM_ASSIGN                                        ~14     '+selected%3D%22selected%22'
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~14     ''
         22    >   CONCAT                                           ~15     ~12, ~14
         23        CONCAT                                           ~16     ~15, '%3E'
         24        CONCAT                                           ~17     ~16, !3
         25        CONCAT                                           ~18     ~17, '%3C%2Foption%3E'
         26        ECHO                                                     ~18
   14    27      > JMP                                                      ->14
         28    >   FE_FREE                                                  $10
   18    29        ECHO                                                     '%3C%2Fselect%3E'
   20    30        ECHO                                                     '++++%3C%2Fform%3E%0A++++++++%3Cbr+%2F%3E%0A++++++++%3Cbr+%2F%3E%0A++++%3Cform+id%3D%22monthForm%22+name%3D%22monthForm%22+method%3D%22post%22+action%3D%22%22%3E%0A++++++++%3Clabel+for%3D%22month%22%3ESelect+the+month%3A+%3C%2Flabel%3E%0A%3C%21--++++++++%3Cinput+type%3Dhidden+id%3D%22month%22+name%3Dmonth%3E--%3E%0A++++++++++++++++++++++++%3Cselect+id%3D%22month%22+name%3D%22month%22+%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2701%27%3EJanuary%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2702%27%3EFebruary%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2703%27%3EMarch%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2704%27%3EApril%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2705%27%3EMay%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2706%27%3EJune%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2707%27%3EJuly%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2708%27%3EAugust%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2709%27%3ESeptember%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2710%27%3EOctober%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2711%27%3ENovember%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%2712%27%3EDecember%3C%2Foption%3E%0A++++++++++++++++++++++++%3C%2Fselect%3E%0A++++++++++++++++++++++++%3Cbr+%2F%3E%0A++++++++++++++++++++++++%3Cbr+%2F%3E%0A++++++++%3Clabel+for%3D%22whole_year%22%3EShow+whole+year%3A+%3C%2Flabel%3E%0A++++++++%3Cinput+type%3D%22checkbox%22+id%3D%22whole_year%22+name%3D%22whole_year%22+%3E%0A++++++++%3Cbr+%2F%3E%0A++++++++%3Cbr+%2F%3E%0A++++++++%3Cinput+type%3D%22submit%22+class%3Dinline+name%3D%22submitButton%22+id%3D%22submitButton%22+value%3D%22Submit%22+%2F%3E%0A++++%3C%2Fform%3E'
   47    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.56 ms | 1405 KiB | 17 Q