3v4l.org

run code in 300+ PHP versions simultaneously
<?php $begin = new DateTime( '2010-05-01' ); $end = new DateTime( '2010-05-10' ); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($begin, $interval, $end); foreach (array_reverse($period) as $dt) echo $dt->format( "l Y-m-d H:i:s\n" );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 28
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/rkTWa
function name:  (null)
number of ops:  30
compiled vars:  !0 = $begin, !1 = $end, !2 = $interval, !3 = $period, !4 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              '2010-05-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        NEW                                              $8      'DateTime'
          5        SEND_VAL_EX                                              '2010-05-10'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    6     8        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
          9        SEND_VAL                                                 '1+day'
         10        DO_FCALL                                      0  $11     
         11        ASSIGN                                                   !2, $11
    7    12        NEW                                              $13     'DatePeriod'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !2
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $13
    9    18        INIT_FCALL                                               'array_reverse'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $16     
         21      > FE_RESET_R                                       $17     $16, ->28
         22    > > FE_FETCH_R                                               $17, !4, ->28
   10    23    >   INIT_METHOD_CALL                                         !4, 'format'
         24        SEND_VAL_EX                                              'l+Y-m-d+H%3Ai%3As%0A'
         25        DO_FCALL                                      0  $18     
         26        ECHO                                                     $18
    9    27      > JMP                                                      ->22
         28    >   FE_FREE                                                  $17
   10    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.01 ms | 1396 KiB | 15 Q