3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.32 ms | 1388 KiB | 15 Q