3v4l.org

run code in 300+ 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 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 11
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 32
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 11
Branch analysis from position: 42
Branch analysis from position: 11
filename:       /in/BZOmb
function name:  (null)
number of ops:  43
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                                                      ->33
    8    11    >   CONCAT                                           ~8      !2, '%0A'
         12        ECHO                                                     ~8
    9    13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 4
         16        SEND_VAL                                                 2
         17        DO_ICALL                                         $9      
         18        IS_EQUAL                                                 $9, '12'
         19      > JMPZ                                                     ~10, ->32
   10    20    >   INIT_FCALL                                               'date'
         21        SEND_VAL                                                 'Y'
         22        INIT_FCALL                                               'strtotime'
         23        CONCAT                                           ~11     !2, '01'
         24        SEND_VAL                                                 ~11
         25        DO_ICALL                                         $12     
         26        SEND_VAR                                                 $12
         27        DO_ICALL                                         $13     
         28        ADD                                              ~14     $13, 1
         29        CONCAT                                           ~15     ~14, '01'
         30        ASSIGN                                                   !2, ~15
    9    31      > JMP                                                      ->33
   12    32    >   PRE_INC                                                  !2
    7    33    >   INIT_FCALL                                               'date'
         34        SEND_VAL                                                 'Ym'
         35        INIT_FCALL                                               'strtotime'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                         $18     
         38        SEND_VAR                                                 $18
         39        DO_ICALL                                         $19     
         40        IS_SMALLER_OR_EQUAL                                      !2, $19
         41      > JMPNZ                                                    ~20, ->11
   13    42    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.14 ms | 1450 KiB | 16 Q