3v4l.org

run code in 500+ PHP versions simultaneously
<?php $demo = [ (object) ['key' => 'a', 'xxx' => 'xxx'], (object) ['key' => 'b', 'xxx' => 'xxx'], (object) ['key' => 'c', 'xxx' => 'xxx'] ]; $result = array_combine(array_column($demo, 'key'), $demo); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uKsdS
function name:  (null)
number of ops:  20
compiled vars:  !0 = $demo, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   CAST                                              8  ~2      <array>
          1        INIT_ARRAY                                           ~3      ~2
          2        CAST                                              8  ~4      <array>
          3        ADD_ARRAY_ELEMENT                                    ~3      ~4
          4        CAST                                              8  ~5      <array>
          5        ADD_ARRAY_ELEMENT                                    ~3      ~5
    3     6        ASSIGN                                                       !0, ~3
    9     7        INIT_FCALL                                                   'array_combine'
          8        INIT_FCALL                                                   'array_column'
          9        SEND_VAR                                                     !0
         10        SEND_VAL                                                     'key'
         11        DO_ICALL                                             $7      
         12        SEND_VAR                                                     $7
         13        SEND_VAR                                                     !0
         14        DO_ICALL                                             $8      
         15        ASSIGN                                                       !1, $8
   11    16        INIT_FCALL                                                   'print_r'
         17        SEND_VAR                                                     !1
         18        DO_ICALL                                                     
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.88 ms | 1916 KiB | 16 Q