3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_date = '2014-3-19'; $end_date = '2014-5-19'; $begin = new DateTime( $start_date ); $end = new DateTime(date("Y-m-d",strtotime("+1 day", strtotime($end_date)))); while($begin < $end) { $period[] = $begin->format('Y-m-d'); $begin->modify('+1 day'); } print_r($period);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 22
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 22
Branch analysis from position: 32
Branch analysis from position: 22
filename:       /in/3XCeW
function name:  (null)
number of ops:  36
compiled vars:  !0 = $start_date, !1 = $end_date, !2 = $begin, !3 = $end, !4 = $period
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2014-3-19'
    4     1        ASSIGN                                                   !1, '2014-5-19'
    6     2        NEW                                              $7      'DateTime'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $7
    7     6        NEW                                              $10     'DateTime'
          7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y-m-d'
          9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 '%2B1+day'
         11        INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $11     
         14        SEND_VAR                                                 $11
         15        DO_ICALL                                         $12     
         16        SEND_VAR                                                 $12
         17        DO_ICALL                                         $13     
         18        SEND_VAR_NO_REF_EX                                       $13
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $10
    8    21      > JMP                                                      ->30
    9    22    >   INIT_METHOD_CALL                                         !2, 'format'
         23        SEND_VAL_EX                                              'Y-m-d'
         24        DO_FCALL                                      0  $17     
         25        ASSIGN_DIM                                               !4
         26        OP_DATA                                                  $17
   10    27        INIT_METHOD_CALL                                         !2, 'modify'
         28        SEND_VAL_EX                                              '%2B1+day'
         29        DO_FCALL                                      0          
    8    30    >   IS_SMALLER                                               !2, !3
         31      > JMPNZ                                                    ~19, ->22
   13    32    >   INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !4
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160 ms | 1396 KiB | 19 Q