3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datebeginday=24; $datebeginmonth=04; $datebeginyear=2015; $datbegin = new DateTime($datebeginday.'-'.$datebeginmonth.'-'.$datebeginyear); $datend = $datbegin->modify('+84 day'); $interval = DateInterval::createFromDateString('7 day'); $period = new DatePeriod($datbegin, $interval, $datend); foreach($period as $dt){ echo $dt; echo "<br/>".$dt+$interval; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 32
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/ClPis
function name:  (null)
number of ops:  34
compiled vars:  !0 = $datebeginday, !1 = $datebeginmonth, !2 = $datebeginyear, !3 = $datbegin, !4 = $datend, !5 = $interval, !6 = $period, !7 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 24
    3     1        ASSIGN                                                   !1, 4
    4     2        ASSIGN                                                   !2, 2015
    5     3        NEW                                              $11     'DateTime'
          4        CONCAT                                           ~12     !0, '-'
          5        CONCAT                                           ~13     ~12, !1
          6        CONCAT                                           ~14     ~13, '-'
          7        CONCAT                                           ~15     ~14, !2
          8        SEND_VAL_EX                                              ~15
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !3, $11
    6    11        INIT_METHOD_CALL                                         !3, 'modify'
         12        SEND_VAL_EX                                              '%2B84+day'
         13        DO_FCALL                                      0  $18     
         14        ASSIGN                                                   !4, $18
    7    15        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
         16        SEND_VAL                                                 '7+day'
         17        DO_FCALL                                      0  $20     
         18        ASSIGN                                                   !5, $20
    8    19        NEW                                              $22     'DatePeriod'
         20        SEND_VAR_EX                                              !3
         21        SEND_VAR_EX                                              !5
         22        SEND_VAR_EX                                              !4
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !6, $22
    9    25      > FE_RESET_R                                       $25     !6, ->32
         26    > > FE_FETCH_R                                               $25, !7, ->32
   10    27    >   ECHO                                                     !7
   11    28        ADD                                              ~26     !7, !5
         29        CONCAT                                           ~27     '%3Cbr%2F%3E', ~26
         30        ECHO                                                     ~27
    9    31      > JMP                                                      ->26
         32    >   FE_FREE                                                  $25
   12    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.61 ms | 1395 KiB | 13 Q