3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date('m/Y', strtotime("20170501")); echo '<br/>'; $a = "2007-01-01"; $b = "2008-02-15"; $i = date("Ym", strtotime($a)); while($i <= date("Ym", strtotime($b))){ echo $i."\n"; if(substr($i, 4, 2) == "12") $i = (date("Y", strtotime($i."01")) + 1)."01"; else $i++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 20
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 41
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 20
Branch analysis from position: 51
Branch analysis from position: 20
filename:       /in/oDtrE
function name:  (null)
number of ops:  52
compiled vars:  !0 = $a, !1 = $b, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'm%2FY'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '20170501'
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                         $4      
          7        ECHO                                                     $4
          8        ECHO                                                     '%3Cbr%2F%3E'
    5     9        ASSIGN                                                   !0, '2007-01-01'
    6    10        ASSIGN                                                   !1, '2008-02-15'
    8    11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'Ym'
         13        INIT_FCALL                                               'strtotime'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !2, $8
    9    19      > JMP                                                      ->42
   10    20    >   CONCAT                                           ~10     !2, '%0A'
         21        ECHO                                                     ~10
   11    22        INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !2
         24        SEND_VAL                                                 4
         25        SEND_VAL                                                 2
         26        DO_ICALL                                         $11     
         27        IS_EQUAL                                                 $11, '12'
         28      > JMPZ                                                     ~12, ->41
   12    29    >   INIT_FCALL                                               'date'
         30        SEND_VAL                                                 'Y'
         31        INIT_FCALL                                               'strtotime'
         32        CONCAT                                           ~13     !2, '01'
         33        SEND_VAL                                                 ~13
         34        DO_ICALL                                         $14     
         35        SEND_VAR                                                 $14
         36        DO_ICALL                                         $15     
         37        ADD                                              ~16     $15, 1
         38        CONCAT                                           ~17     ~16, '01'
         39        ASSIGN                                                   !2, ~17
         40      > JMP                                                      ->42
   14    41    >   PRE_INC                                                  !2
    9    42    >   INIT_FCALL                                               'date'
         43        SEND_VAL                                                 'Ym'
         44        INIT_FCALL                                               'strtotime'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                         $20     
         47        SEND_VAR                                                 $20
         48        DO_ICALL                                         $21     
         49        IS_SMALLER_OR_EQUAL                                      !2, $21
         50      > JMPNZ                                                    ~22, ->20
   15    51    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.3 ms | 1400 KiB | 19 Q