3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2012-07-01'); $interval = new DateInterval('P7D'); $end = new DateTime('2012-07-31'); $period = new DatePeriod($start, $interval, $end,DatePeriod::EXCLUDE_START_DATE); var_dump($period); foreach($period as $date) { var_dump($date); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/3kZEN
function name:  (null)
number of ops:  30
compiled vars:  !0 = $start, !1 = $interval, !2 = $end, !3 = $period, !4 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              '2012-07-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        NEW                                              $8      'DateInterval'
          5        SEND_VAL_EX                                              'P7D'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    5     8        NEW                                              $11     'DateTime'
          9        SEND_VAL_EX                                              '2012-07-31'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $11
    7    12        NEW                                              $14     'DatePeriod'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        SEND_VAR_EX                                              !2
         16        SEND_VAL_EX                                              1
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !3, $14
    8    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
   10    22      > FE_RESET_R                                       $18     !3, ->28
         23    > > FE_FETCH_R                                               $18, !4, ->28
   11    24    >   INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
   10    27      > JMP                                                      ->23
         28    >   FE_FREE                                                  $18
   12    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.01 ms | 1396 KiB | 15 Q