3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.31 ms | 1386 KiB | 19 Q