3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.95 ms | 1394 KiB | 17 Q