3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ 'a' => [ 'name' => "Name 1", 'age' => "99", 'add' => "" ], 'b' => [ 'name' => "Name 2", 'age' => "99", 'add' => "Add2" ], 'c' => [ 'name' => "Name 3", 'age' => "99", 'add' => "Add3" ], 'd' => [ 'name' => "", 'age' => "", 'add' => "Add4" ] ]; $output = array_map(function($row) { return array_keys(array_filter($row, function ($e) { return empty($e) && $e !== 0; })); }, $arrays); print_r(array_filter($output));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c23ZB
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arrays, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   26     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   30     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
   26     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   32     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_filter'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
         13      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c23ZB
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        INIT_FCALL                                               'array_keys'
          2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   29     5        SEND_VAL                                                 ~1
   27     6        DO_ICALL                                         $2      
   29     7        SEND_VAR                                                 $2
   27     8        DO_ICALL                                         $3      
   29     9      > RETURN                                                   $3
   30    10*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/c23ZB
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   28     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2      > JMPZ_EX                                          ~1      ~1, ->5
          3    >   IS_NOT_IDENTICAL                                 ~2      !0, 0
          4        BOOL                                             ~1      ~2
          5    > > RETURN                                                   ~1
   29     6*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.21 ms | 1002 KiB | 17 Q