3v4l.org

run code in 300+ PHP versions simultaneously
<?php $begin = new DateTime( '2014-9-01' ); $end = new DateTime( '2014-9-30' ); $interval = DateInterval::createFromDateString('last thursday of next month'); $period = new DatePeriod($begin, $interval, $end, DatePeriod::EXCLUDE_START_DATE); foreach ( $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 = 20, Position 2 = 26
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/5dlMn
function name:  (null)
number of ops:  28
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                                              '2014-9-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        NEW                                              $8      'DateTime'
          5        SEND_VAL_EX                                              '2014-9-30'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    6     8        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
          9        SEND_VAL                                                 'last+thursday+of+next+month'
         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        SEND_VAL_EX                                              1
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !3, $13
    9    19      > FE_RESET_R                                       $16     !3, ->26
         20    > > FE_FETCH_R                                               $16, !4, ->26
   10    21    >   INIT_METHOD_CALL                                         !4, 'format'
         22        SEND_VAL_EX                                              'l+Y-m-d+H%3Ai%3As%0A'
         23        DO_FCALL                                      0  $17     
         24        ECHO                                                     $17
    9    25      > JMP                                                      ->20
         26    >   FE_FREE                                                  $16
   10    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.3 ms | 1395 KiB | 13 Q