3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '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" ] ]; $result = []; foreach ($array as $rowKey => $row) { foreach ($row as $key => $value) { if (!strlen($value)) { $result[$rowKey][] = $key; } } } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/cgJKv
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $result, !2 = $row, !3 = $rowKey, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   26     1        ASSIGN                                                   !1, <array>
   27     2      > FE_RESET_R                                       $8      !0, ->17
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->17
          4    >   ASSIGN                                                   !3, ~9
   28     5      > FE_RESET_R                                       $11     !2, ->15
          6    > > FE_FETCH_R                                       ~12     $11, !4, ->15
          7    >   ASSIGN                                                   !5, ~12
   29     8        STRLEN                                           ~14     !4
          9        BOOL_NOT                                         ~15     ~14
         10      > JMPZ                                                     ~15, ->14
   30    11    >   FETCH_DIM_W                                      $16     !1, !3
         12        ASSIGN_DIM                                               $16
         13        OP_DATA                                                  !5
   28    14    > > JMP                                                      ->6
         15    >   FE_FREE                                                  $11
   27    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $8
   34    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.3 ms | 1005 KiB | 14 Q