3v4l.org

run code in 300+ PHP versions simultaneously
<?php $records = array( array( 'id' => 1, 'value' => 1, ), array( 'id' => 2, 'value' => 2, ), ); $foo = array_column($records, 'value', 'id', null); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XjT3B
function name:  (null)
number of ops:  12
compiled vars:  !0 = $records, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'value'
          4        SEND_VAL                                                 'id'
          5        SEND_VAL                                                 null
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !1, $3
   14     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.87 ms | 1394 KiB | 17 Q