3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = ['a' => 0, 'c' => 1, 'e' => 2]; $a2 = ['b' => 3, 'd' => 4, 'f' => 5]; $result = []; for ($i = 0, $count = count($a1); $i < $count; ++$i) { $result += array_slice($a1, $i, 1) + array_slice($a2, $i, 1); } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
Branch analysis from position: 7
filename:       /in/hqMC7
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a1, !1 = $a2, !2 = $result, !3 = $i, !4 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    7     3        ASSIGN                                                   !3, 0
          4        COUNT                                            ~9      !0
          5        ASSIGN                                                   !4, ~9
          6      > JMP                                                      ->20
    8     7    >   INIT_FCALL                                               'array_slice'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !3
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $11     
    9    12        INIT_FCALL                                               'array_slice'
         13        SEND_VAR                                                 !1
         14        SEND_VAR                                                 !3
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $12     
         17        ADD                                              ~13     $11, $12
         18        ASSIGN_OP                                     1          !2, ~13
    7    19        PRE_INC                                                  !3
         20    >   IS_SMALLER                                               !3, !4
         21      > JMPNZ                                                    ~16, ->7
   12    22    >   INIT_FCALL                                               'var_export'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.92 ms | 1395 KiB | 17 Q