3v4l.org

run code in 500+ PHP versions simultaneously
<?php $types = ['a', 'b', 'c']; // 3x1 array $numbers = [1, 2, 3]; $arr = [$types, $numbers]; Foreach($arr[0] as $key => $val){ $new[] = array_column($arr, $key); } Var_dump($new);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/QWOJg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $types, !1 = $numbers, !2 = $arr, !3 = $val, !4 = $key, !5 = $new
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2        INIT_ARRAY                                           ~8      !0
          3        ADD_ARRAY_ELEMENT                                    ~8      !1
          4        ASSIGN                                                       !2, ~8
    8     5        FETCH_DIM_R                                          ~10     !2, 0
          6      > FE_RESET_R                                           $11     ~10, ->16
          7    > > FE_FETCH_R                                           ~12     $11, !3, ->16
          8    >   ASSIGN                                                       !4, ~12
    9     9        INIT_FCALL                                                   'array_column'
         10        SEND_VAR                                                     !2
         11        SEND_VAR                                                     !4
         12        DO_ICALL                                             $15     
         13        ASSIGN_DIM                                                   !5
         14        OP_DATA                                                      $15
    8    15      > JMP                                                          ->7
         16    >   FE_FREE                                                      $11
   12    17        INIT_FCALL                                                   'var_dump'
         18        SEND_VAR                                                     !5
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.11 ms | 2614 KiB | 15 Q