3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oneMonth = new \DateInterval('P1M'); $startDate = \DateTime::createFromFormat('d H:i:s'); $period = new \DatePeriod($startDate, $oneMonth, 16); foreach($period as $date){ //$date is an instance of \DateTime. I'm just var_dumping it for illustration var_dump($date); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/LYQ2J
function name:  (null)
number of ops:  22
compiled vars:  !0 = $oneMonth, !1 = $startDate, !2 = $period, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateInterval'
          1        SEND_VAL_EX                                              'P1M'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          5        SEND_VAL                                                 'd+H%3Ai%3As'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    4     8        NEW                                              $9      'DatePeriod'
          9        SEND_VAR_EX                                              !1
         10        SEND_VAR_EX                                              !0
         11        SEND_VAL_EX                                              16
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $9
    6    14      > FE_RESET_R                                       $12     !2, ->20
         15    > > FE_FETCH_R                                               $12, !3, ->20
    8    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
    6    19      > JMP                                                      ->15
         20    >   FE_FREE                                                  $12
    9    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.75 ms | 1395 KiB | 15 Q