3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'arr1' => array( 'uids' => array('uid1','uid2','uid3','uid4'), 'dids' => array('did1','did2','did3','did4') ), 'arr2' => array( 'uids' => array('uid21','uid22','uid23','uid24'), 'dids' => array('did21','did22','did23','did24') ) ); $flatUids = array(); $flatDids = array(); $objTmp = (object) array('aFlat' => array()); array_walk_recursive($arr,function(&$v, $k, &$t){ if($k == 'uids') $t[] = $v; },$flatUids); var_dump($flatUids);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nq8lb
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr, !1 = $flatUids, !2 = $flatDids, !3 = $objTmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   16     2        ASSIGN                                                   !2, <array>
   17     3        CAST                                          8  ~7      <array>
          4        ASSIGN                                                   !3, ~7
   18     5        INIT_FCALL                                               'array_walk_recursive'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNq8lb%3A18%240'
   22     8        SEND_VAL                                                 ~9
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   23    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNq8lb%3A18%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/Nq8lb
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   19     3        IS_EQUAL                                                 !1, 'uids'
          4      > JMPZ                                                     ~3, ->7
   20     5    >   ASSIGN_DIM                                               !2
          6        OP_DATA                                                  !0
   22     7    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNq8lb%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.69 ms | 1395 KiB | 17 Q