3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.49 ms | 1401 KiB | 15 Q