3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2014; $startQuarter = 4; $endYear = date('Y'); $endQuarter = floor((date('m')-1) / 3) + 1; for($year = $startYear; $year <= $endYear; $year++) { for($quarter = $startQuarter; $quarter <= $endQuarter; $quarter++) { echo '<option value="' . $year . ' / ' . $quarter . ((($interval == $year . ' / ' . $quarter) || (!$interval && $quarter == $endQuarter && $year == $endYear)) ? ' selected="selected"' : '') . '">' . $year . ' / ' . $quarter . '</option>'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 18
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 20
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 18
Branch analysis from position: 52
Branch analysis from position: 18
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 27, Position 2 = 35
Branch analysis from position: 27
2 jumps found. (Code = 46) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 46) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 20
Branch analysis from position: 49
Branch analysis from position: 20
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 20
Branch analysis from position: 49
Branch analysis from position: 20
Branch analysis from position: 34
Branch analysis from position: 31
Branch analysis from position: 35
filename:       /in/d9BNA
function name:  (null)
number of ops:  53
compiled vars:  !0 = $startYear, !1 = $startQuarter, !2 = $endYear, !3 = $endQuarter, !4 = $year, !5 = $quarter, !6 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2014
    4     1        ASSIGN                                                   !1, 4
    6     2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'Y'
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !2, $9
    7     6        INIT_FCALL                                               'floor'
          7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'm'
          9        DO_ICALL                                         $11     
         10        SUB                                              ~12     $11, 1
         11        DIV                                              ~13     ~12, 3
         12        SEND_VAL                                                 ~13
         13        DO_ICALL                                         $14     
         14        ADD                                              ~15     $14, 1
         15        ASSIGN                                                   !3, ~15
    9    16        ASSIGN                                                   !4, !0
         17      > JMP                                                      ->50
   11    18    >   ASSIGN                                                   !5, !1
         19      > JMP                                                      ->47
   13    20    >   CONCAT                                           ~19     '%3Coption+value%3D%22', !4
         21        CONCAT                                           ~20     ~19, '+%2F+'
         22        CONCAT                                           ~21     ~20, !5
         23        CONCAT                                           ~22     !4, '+%2F+'
         24        CONCAT                                           ~23     ~22, !5
         25        IS_EQUAL                                         ~24     !6, ~23
         26      > JMPNZ_EX                                         ~24     ~24, ->35
         27    >   BOOL_NOT                                         ~25     !6
         28      > JMPZ_EX                                          ~25     ~25, ->31
         29    >   IS_EQUAL                                         ~26     !5, !3
         30        BOOL                                             ~25     ~26
         31    > > JMPZ_EX                                          ~25     ~25, ->34
         32    >   IS_EQUAL                                         ~27     !4, !2
         33        BOOL                                             ~25     ~27
         34    >   BOOL                                             ~24     ~25
         35    > > JMPZ                                                     ~24, ->38
         36    >   QM_ASSIGN                                        ~28     '+selected%3D%22selected%22'
         37      > JMP                                                      ->39
         38    >   QM_ASSIGN                                        ~28     ''
         39    >   CONCAT                                           ~29     ~21, ~28
         40        CONCAT                                           ~30     ~29, '%22%3E'
         41        CONCAT                                           ~31     ~30, !4
         42        CONCAT                                           ~32     ~31, '+%2F+'
         43        CONCAT                                           ~33     ~32, !5
         44        CONCAT                                           ~34     ~33, '%3C%2Foption%3E'
         45        ECHO                                                     ~34
   11    46        PRE_INC                                                  !5
         47    >   IS_SMALLER_OR_EQUAL                                      !5, !3
         48      > JMPNZ                                                    ~36, ->20
    9    49    >   PRE_INC                                                  !4
         50    >   IS_SMALLER_OR_EQUAL                                      !4, !2
         51      > JMPNZ                                                    ~38, ->18
   17    52    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.52 ms | 1400 KiB | 17 Q