3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.3 ms | 1011 KiB | 14 Q