3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = '2014-07-19 13:00'; $date2 = '2014-07-20 13:00'; $arr = range(strtotime($date1), strtotime($date2), 3600); $date_range = array(); foreach ($arr as $a) $date_range[] = date('Y-m-d H:i:s', $a); print_r($date_range);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/bPiDD
function name:  (null)
number of ops:  29
compiled vars:  !0 = $date1, !1 = $date2, !2 = $arr, !3 = $date_range, !4 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2014-07-19+13%3A00'
    4     1        ASSIGN                                                   !1, '2014-07-20+13%3A00'
    6     2        INIT_FCALL                                               'range'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        SEND_VAR                                                 $7
          7        INIT_FCALL                                               'strtotime'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        SEND_VAR                                                 $8
         11        SEND_VAL                                                 3600
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
    8    14        ASSIGN                                                   !3, <array>
    9    15      > FE_RESET_R                                       $12     !2, ->24
         16    > > FE_FETCH_R                                               $12, !4, ->24
   10    17    >   INIT_FCALL                                               'date'
         18        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $14     
         21        ASSIGN_DIM                                               !3
         22        OP_DATA                                                  $14
    9    23      > JMP                                                      ->16
         24    >   FE_FREE                                                  $12
   12    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.36 ms | 1388 KiB | 21 Q