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*2) < 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 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 5
Branch analysis from position: 28
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 = 15, Position 2 = 24
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 5
Branch analysis from position: 28
Branch analysis from position: 5
Branch analysis from position: 24
Branch analysis from position: 11
filename:       /in/eo976
function name:  (null)
number of ops:  33
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                                                      ->25
    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    >   MUL                                              ~12     !3, 2
         12        COUNT                                            ~13     !1
         13        IS_SMALLER                                               ~12, ~13
         14      > JMPZ                                                     ~14, ->24
   16    15    >   MUL                                              ~16     !3, 2
         16        FETCH_DIM_R                                      ~17     !1, ~16
         17        ASSIGN_DIM                                               !2
         18        OP_DATA                                                  ~17
   17    19        MUL                                              ~19     !3, 2
         20        ADD                                              ~20     ~19, 1
         21        FETCH_DIM_R                                      ~21     !1, ~20
         22        ASSIGN_DIM                                               !2
         23        OP_DATA                                                  ~21
    7    24    >   PRE_INC                                                  !3
         25    >   COUNT                                            ~23     !0
         26        IS_SMALLER                                               !3, ~23
         27      > JMPNZ                                                    ~24, ->5
   21    28    >   ECHO                                                     '%3Cpre%3E'
         29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.34 ms | 1396 KiB | 15 Q