3v4l.org

run code in 300+ PHP versions simultaneously
<?php $periodStartDate = new \DateTime('today'); $periodStartDate = $periodStartDate->modify('-5 days'); $periodEndDate = new \DateTime('today'); $periodEndDate->modify('+1 day'); $period = new \DatePeriod($periodStartDate, \DateInterval::createFromDateString('1 day'), $periodEndDate); foreach ($period as $date) { echo $date->format('Y-m-d'); //if ($this->getDayOffInDaysOffByDate($daysOff, $date) || $this->isWeekend($date)) { // $daysCount--; //} }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 31
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 31
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/tWdLi
function name:  (null)
number of ops:  33
compiled vars:  !0 = $periodStartDate, !1 = $periodEndDate, !2 = $period, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              'today'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        INIT_METHOD_CALL                                         !0, 'modify'
          5        SEND_VAL_EX                                              '-5+days'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !0, $7
    4     8        NEW                                              $9      'DateTime'
          9        SEND_VAL_EX                                              'today'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $9
    5    12        INIT_METHOD_CALL                                         !1, 'modify'
         13        SEND_VAL_EX                                              '%2B1+day'
         14        DO_FCALL                                      0          
    6    15        NEW                                              $13     'DatePeriod'
         16        SEND_VAR_EX                                              !0
         17        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
         18        SEND_VAL                                                 '1+day'
         19        DO_FCALL                                      0  $14     
         20        SEND_VAR_NO_REF_EX                                       $14
         21        SEND_VAR_EX                                              !1
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !2, $13
    8    24      > FE_RESET_R                                       $17     !2, ->31
         25    > > FE_FETCH_R                                               $17, !3, ->31
    9    26    >   INIT_METHOD_CALL                                         !3, 'format'
         27        SEND_VAL_EX                                              'Y-m-d'
         28        DO_FCALL                                      0  $18     
         29        ECHO                                                     $18
    8    30      > JMP                                                      ->25
         31    >   FE_FREE                                                  $17
   13    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.43 ms | 1399 KiB | 13 Q