3v4l.org

run code in 300+ PHP versions simultaneously
<?php $workTimeRange = [ ['time'=>600], ['time'=>900], ['time'=>3600], ['time'=>4000], ]; $arrWorkRange = []; for ($i = 0; $i < count($workTimeRange); $i+=2) { echo $i.PHP_EOL; array_push($arrWorkRange, [ 'start_time' => $workTimeRange[$i]['time'], 'end_time' => $workTimeRange[$i+1]['time'], ]); print_r($arrWorkRange); } print_R($arrWorkRange); for($i=0;$i<count($workTimeRange);$i+=2){ echo $i.PHP_EOL; }
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 = 24, Position 2 = 4
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 29
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 29
Branch analysis from position: 35
Branch analysis from position: 29
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 4
Branch analysis from position: 24
Branch analysis from position: 4
filename:       /in/gO3tt
function name:  (null)
number of ops:  36
compiled vars:  !0 = $workTimeRange, !1 = $arrWorkRange, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->21
   13     4    >   CONCAT                                           ~6      !2, '%0A'
          5        ECHO                                                     ~6
   14     6        INIT_FCALL                                               'array_push'
          7        SEND_REF                                                 !1
   15     8        FETCH_DIM_R                                      ~7      !0, !2
          9        FETCH_DIM_R                                      ~8      ~7, 'time'
         10        INIT_ARRAY                                       ~9      ~8, 'start_time'
   16    11        ADD                                              ~10     !2, 1
         12        FETCH_DIM_R                                      ~11     !0, ~10
         13        FETCH_DIM_R                                      ~12     ~11, 'time'
         14        ADD_ARRAY_ELEMENT                                ~9      ~12, 'end_time'
         15        SEND_VAL                                                 ~9
         16        DO_ICALL                                                 
   18    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   12    20        ASSIGN_OP                                     1          !2, 2
         21    >   COUNT                                            ~16     !0
         22        IS_SMALLER                                               !2, ~16
         23      > JMPNZ                                                    ~17, ->4
   20    24    >   INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
   22    27        ASSIGN                                                   !2, 0
         28      > JMP                                                      ->32
   23    29    >   CONCAT                                           ~20     !2, '%0A'
         30        ECHO                                                     ~20
   22    31        ASSIGN_OP                                     1          !2, 2
         32    >   COUNT                                            ~22     !0
         33        IS_SMALLER                                               !2, ~22
         34      > JMPNZ                                                    ~23, ->29
   24    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.7 ms | 937 KiB | 18 Q