3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.92 ms | 1388 KiB | 15 Q