3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime(); $interval = new DateInterval('P2W'); $period = new DatePeriod( $start, $interval, 1, DatePeriod::EXCLUDE_START_DATE ); foreach ($period as $nextDateTime) { echo $nextDateTime->format('Y-m-d H:i:s'), PHP_EOL; }
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/CK2lI
function name:  (null)
number of ops:  24
compiled vars:  !0 = $start, !1 = $interval, !2 = $period, !3 = $nextDateTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        NEW                                              $7      'DateInterval'
          4        SEND_VAL_EX                                              'P2W'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    4     7        NEW                                              $10     'DatePeriod'
    5     8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
    7    10        SEND_VAL_EX                                              1
    8    11        SEND_VAL_EX                                              1
         12        DO_FCALL                                      0          
    4    13        ASSIGN                                                   !2, $10
   10    14      > FE_RESET_R                                       $13     !2, ->22
         15    > > FE_FETCH_R                                               $13, !3, ->22
   11    16    >   INIT_METHOD_CALL                                         !3, 'format'
         17        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         18        DO_FCALL                                      0  $14     
         19        ECHO                                                     $14
         20        ECHO                                                     '%0A'
   10    21      > JMP                                                      ->15
         22    >   FE_FREE                                                  $13
   12    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.49 ms | 1394 KiB | 13 Q