3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.47 ms | 1395 KiB | 13 Q