3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blue = array(1,4,7); $red = array(2,3,5,6,8,9); $final_array = array(); for($i=0; $i<sizeof($blue); $i++) { if($i < sizeof($blue)) { $final_array[] = $blue[$i]; } if($i < sizeof($red)) { $final_array[] = $red[$i*2]; $final_array[] = $red[($i*2)+1]; } } echo '<pre>'; print_r($final_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 5
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 5
Branch analysis from position: 27
Branch analysis from position: 5
Branch analysis from position: 23
Branch analysis from position: 11
filename:       /in/gT7SJ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $blue, !1 = $red, !2 = $final_array, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    7     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->24
    9     5    >   COUNT                                            ~8      !0
          6        IS_SMALLER                                               !3, ~8
          7      > JMPZ                                                     ~9, ->11
   11     8    >   FETCH_DIM_R                                      ~11     !0, !3
          9        ASSIGN_DIM                                               !2
         10        OP_DATA                                                  ~11
   14    11    >   COUNT                                            ~12     !1
         12        IS_SMALLER                                               !3, ~12
         13      > JMPZ                                                     ~13, ->23
   16    14    >   MUL                                              ~15     !3, 2
         15        FETCH_DIM_R                                      ~16     !1, ~15
         16        ASSIGN_DIM                                               !2
         17        OP_DATA                                                  ~16
   17    18        MUL                                              ~18     !3, 2
         19        ADD                                              ~19     ~18, 1
         20        FETCH_DIM_R                                      ~20     !1, ~19
         21        ASSIGN_DIM                                               !2
         22        OP_DATA                                                  ~20
    7    23    >   PRE_INC                                                  !3
         24    >   COUNT                                            ~22     !0
         25        IS_SMALLER                                               !3, ~22
         26      > JMPNZ                                                    ~23, ->5
   21    27    >   ECHO                                                     '%3Cpre%3E'
         28        INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.71 ms | 1396 KiB | 15 Q