3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.75 ms | 1396 KiB | 15 Q