3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days = array('Monday' => array('open_at' => '09:00', 'close_at' => '18:00'), 'Tuesday' => array('open_at' => '11:00', 'close_at' => '14:00') ); foreach ($days as &$day) { $time = new DateTime($day['open_at']); $close = new DateTime($day['close_at']); while ($time < $close) { $day[] = $time->format('H:i'); $time->modify('+15 minutes'); } } print_r($days);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 27
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 16
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 16
Branch analysis from position: 26
Branch analysis from position: 16
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/eEUTq
function name:  (null)
number of ops:  32
compiled vars:  !0 = $days, !1 = $day, !2 = $time, !3 = $close
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1      > FE_RESET_RW                                      $5      !0, ->27
          2    > > FE_FETCH_RW                                              $5, !1, ->27
    8     3    >   NEW                                              $6      'DateTime'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_DIM_FUNC_ARG                               $7      !1, 'open_at'
          6        SEND_FUNC_ARG                                            $7
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $6
    9     9        NEW                                              $10     'DateTime'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_DIM_FUNC_ARG                               $11     !1, 'close_at'
         12        SEND_FUNC_ARG                                            $11
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !3, $10
   10    15      > JMP                                                      ->24
   11    16    >   INIT_METHOD_CALL                                         !2, 'format'
         17        SEND_VAL_EX                                              'H%3Ai'
         18        DO_FCALL                                      0  $15     
         19        ASSIGN_DIM                                               !1
         20        OP_DATA                                                  $15
   12    21        INIT_METHOD_CALL                                         !2, 'modify'
         22        SEND_VAL_EX                                              '%2B15+minutes'
         23        DO_FCALL                                      0          
   10    24    >   IS_SMALLER                                               !2, !3
         25      > JMPNZ                                                    ~17, ->16
    7    26    > > JMP                                                      ->2
         27    >   FE_FREE                                                  $5
   15    28        INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.62 ms | 1011 KiB | 14 Q