3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user = [ 'firstname' => 'first', 'middle' => 'middle', 'lastname' => 'last', 'address' => [ 'street' => 'streeeeeet', 'housenumber' => '10' ] ]; $interestingKeys = [ 'address', 'someOtherKey' ]; foreach ($user as $key => $val) { //is it in the keys we're interested in, and is it an array (sub array of $user)? if (in_array($key, $interestingKeys) && is_array($val)){ // Scan through inner loop foreach ($val as $sub_val) { echo "$sub_val\n"; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
Branch analysis from position: 20
Branch analysis from position: 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/H0gLN
function name:  (null)
number of ops:  23
compiled vars:  !0 = $user, !1 = $interestingKeys, !2 = $val, !3 = $key, !4 = $sub_val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   18     2      > FE_RESET_R                                       $7      !0, ->21
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->21
          4    >   ASSIGN                                                   !3, ~8
   20     5        INIT_FCALL                                               'in_array'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $10     
          9      > JMPZ_EX                                          ~11     $10, ->12
         10    >   TYPE_CHECK                                  128  ~12     !2
         11        BOOL                                             ~11     ~12
         12    > > JMPZ                                                     ~11, ->20
   22    13    > > FE_RESET_R                                       $13     !2, ->19
         14    > > FE_FETCH_R                                               $13, !4, ->19
   23    15    >   NOP                                                      
         16        FAST_CONCAT                                      ~14     !4, '%0A'
         17        ECHO                                                     ~14
   22    18      > JMP                                                      ->14
         19    >   FE_FREE                                                  $13
   18    20    > > JMP                                                      ->3
         21    >   FE_FREE                                                  $7
   27    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.68 ms | 1396 KiB | 15 Q