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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.33 ms | 1395 KiB | 15 Q