3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = []; $ar['one'][] = 1; $ar['one'][] = 2; $ar['two'][] = 1; $ar['two'][] = 2; $ar['three'][] = 1; $ar['three'][] = 2; print_r($ar); $keys = array_keys($ar); $vals = array_column($ar,0); $res = array_combine($keys,$vals); print_r($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ImkUV
function name:  (null)
number of ops:  40
compiled vars:  !0 = $ar, !1 = $keys, !2 = $vals, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_DIM_W                                      $5      !0, 'one'
          2        ASSIGN_DIM                                               $5
          3        OP_DATA                                                  1
    5     4        FETCH_DIM_W                                      $7      !0, 'one'
          5        ASSIGN_DIM                                               $7
          6        OP_DATA                                                  2
    6     7        FETCH_DIM_W                                      $9      !0, 'two'
          8        ASSIGN_DIM                                               $9
          9        OP_DATA                                                  1
    7    10        FETCH_DIM_W                                      $11     !0, 'two'
         11        ASSIGN_DIM                                               $11
         12        OP_DATA                                                  2
    8    13        FETCH_DIM_W                                      $13     !0, 'three'
         14        ASSIGN_DIM                                               $13
         15        OP_DATA                                                  1
    9    16        FETCH_DIM_W                                      $15     !0, 'three'
         17        ASSIGN_DIM                                               $15
         18        OP_DATA                                                  2
   11    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
   13    22        INIT_FCALL                                               'array_keys'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $18     
         25        ASSIGN                                                   !1, $18
   14    26        INIT_FCALL                                               'array_column'
         27        SEND_VAR                                                 !0
         28        SEND_VAL                                                 0
         29        DO_ICALL                                         $20     
         30        ASSIGN                                                   !2, $20
   15    31        INIT_FCALL                                               'array_combine'
         32        SEND_VAR                                                 !1
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                         $22     
         35        ASSIGN                                                   !3, $22
   17    36        INIT_FCALL                                               'print_r'
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.59 ms | 1401 KiB | 21 Q