3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 0 => array ( 0 => array ( 'userid' => '1610', ), 1 => array ( 'userid' => '1614', ), 2 => array ( 'userid' => '1616', ), ), 1 => array ( 0 => array ( 'userid' => '1610', ), 1 => array ( 'userid' => '1614', ), 2 => array ( 'userid' => '1616', ), 3 => array ( 'userid' => '1618', ), ), ); foreach($arr as $sub){ $res[][key($sub[0]) . "s"] = array_column($sub, 'userid'); } var_dump($res);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/A68VA
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arr, !1 = $sub, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   40     1      > FE_RESET_R                                       $4      !0, ->16
          2    > > FE_FETCH_R                                               $4, !1, ->16
   41     3    >   INIT_FCALL                                               'key'
          4        FETCH_DIM_R                                      ~6      !1, 0
          5        SEND_VAL                                                 ~6
          6        DO_ICALL                                         $7      
          7        CONCAT                                           ~8      $7, 's'
          8        INIT_FCALL                                               'array_column'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 'userid'
         11        DO_ICALL                                         $10     
         12        FETCH_DIM_W                                      $5      !2
         13        ASSIGN_DIM                                               $5, ~8
         14        OP_DATA                                                  $10
   40    15      > JMP                                                      ->2
         16    >   FE_FREE                                                  $4
   44    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.52 ms | 1003 KiB | 16 Q