3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new \DatePeriod(new \DateTime('-7 days'), new \DateInterval('P1D'), new \DateTime()); foreach($period as $day){ echo $day->format('j Y-m-d') . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/IsUVg
function name:  (null)
number of ops:  24
compiled vars:  !0 = $period, !1 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DatePeriod'
          1        NEW                                              $3      'DateTime'
          2        SEND_VAL_EX                                              '-7+days'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $3
          5        NEW                                              $5      'DateInterval'
          6        SEND_VAL_EX                                              'P1D'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $5
          9        NEW                                              $7      'DateTime'
         10        DO_FCALL                                      0          
         11        SEND_VAR_NO_REF_EX                                       $7
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !0, $2
    3    14      > FE_RESET_R                                       $11     !0, ->22
         15    > > FE_FETCH_R                                               $11, !1, ->22
    4    16    >   INIT_METHOD_CALL                                         !1, 'format'
         17        SEND_VAL_EX                                              'j+Y-m-d'
         18        DO_FCALL                                      0  $12     
         19        CONCAT                                           ~13     $12, '%0A'
         20        ECHO                                                     ~13
    3    21      > JMP                                                      ->15
         22    >   FE_FREE                                                  $11
    5    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.54 ms | 1394 KiB | 13 Q