3v4l.org

run code in 500+ PHP versions simultaneously
<?php $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 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 11
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 29
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 11
Branch analysis from position: 39
Branch analysis from position: 11
filename:       /in/BZOmb
function name:  (null)
number of ops:  40
compiled vars:  !0 = $a, !1 = $b, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '2007-01-01'
    4     1        ASSIGN                                                       !1, '2008-02-15'
    6     2        INIT_FCALL                                                   'date'
          3        SEND_VAL                                                     'Ym'
          4        INIT_FCALL                                                   'strtotime'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $5      
          7        SEND_VAR                                                     $5
          8        DO_ICALL                                             $6      
          9        ASSIGN                                                       !2, $6
    7    10      > JMP                                                          ->30
    8    11    >   CONCAT                                               ~8      !2, '%0A'
         12        ECHO                                                         ~8
    9    13        FRAMELESS_ICALL_3                substr              ~9      !2, 4
         14        OP_DATA                                                      2
         15        IS_EQUAL                                                     ~9, '12'
         16      > JMPZ                                                         ~10, ->29
   10    17    >   INIT_FCALL                                                   'date'
         18        SEND_VAL                                                     'Y'
         19        INIT_FCALL                                                   'strtotime'
         20        CONCAT                                               ~11     !2, '01'
         21        SEND_VAL                                                     ~11
         22        DO_ICALL                                             $12     
         23        SEND_VAR                                                     $12
         24        DO_ICALL                                             $13     
         25        ADD                                                  ~14     $13, 1
         26        CONCAT                                               ~15     ~14, '01'
         27        ASSIGN                                                       !2, ~15
    9    28      > JMP                                                          ->30
   12    29    >   PRE_INC                                                      !2
    7    30    >   INIT_FCALL                                                   'date'
         31        SEND_VAL                                                     'Ym'
         32        INIT_FCALL                                                   'strtotime'
         33        SEND_VAR                                                     !1
         34        DO_ICALL                                             $18     
         35        SEND_VAR                                                     $18
         36        DO_ICALL                                             $19     
         37        IS_SMALLER_OR_EQUAL                                          !2, $19
         38      > JMPNZ                                                        ~20, ->11
   13    39    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.33 ms | 2960 KiB | 15 Q