3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objs = [ ['value'=>2, 'key'=>'a'], ['value'=>3, 'key'=>'b'] ]; $keys = array_column($objs, 'key'); $index = array_search('c', $keys); $objs[$index]['key'] = 5; var_dump($objs);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lc2Dd
function name:  (null)
number of ops:  18
compiled vars:  !0 = $objs, !1 = $keys, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'key'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'array_search'
          7        SEND_VAL                                                 'c'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    8    11        FETCH_DIM_W                                      $8      !0, !2
         12        ASSIGN_DIM                                               $8, 'key'
         13        OP_DATA                                                  5
    9    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.55 ms | 999 KiB | 16 Q