3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_key_exists_recursive($key, array $array, $strict = false) { foreach ($array as $k => $v) { if ($strict && $key === $k) { return true; } else if (!$strict && $key == $k) { return true; } else if (is_array($v)) { return array_key_exists_recursive($key, $v, $strict); } } } $array = Array ( 21 => Array ( ) , 24 => Array ( 22 => Array ( ) , 25 => Array ( 26 => Array ( ) , ) ) ); var_dump(array_key_exists_recursive(22, $array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WcVZD
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, <array>
   24     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'array_key_exists_recursive'
          3        SEND_VAL                                                 22
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function array_key_exists_recursive:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 31
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 31
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 17
Branch analysis from position: 9
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/WcVZD
function name:  array_key_exists_recursive
number of ops:  33
compiled vars:  !0 = $key, !1 = $array, !2 = $strict, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <false>
    3     3      > FE_RESET_R                                       $5      !1, ->31
          4    > > FE_FETCH_R                                       ~6      $5, !3, ->31
          5    >   ASSIGN                                                   !4, ~6
    4     6      > JMPZ_EX                                          ~8      !2, ->9
          7    >   IS_IDENTICAL                                     ~9      !0, !4
          8        BOOL                                             ~8      ~9
          9    > > JMPZ                                                     ~8, ->13
    5    10    >   FE_FREE                                                  $5
         11      > RETURN                                                   <true>
         12*       JMP                                                      ->30
    6    13    >   BOOL_NOT                                         ~10     !2
         14      > JMPZ_EX                                          ~10     ~10, ->17
         15    >   IS_EQUAL                                         ~11     !0, !4
         16        BOOL                                             ~10     ~11
         17    > > JMPZ                                                     ~10, ->21
    7    18    >   FE_FREE                                                  $5
         19      > RETURN                                                   <true>
         20*       JMP                                                      ->30
    8    21    >   TYPE_CHECK                                  128          !3
         22      > JMPZ                                                     ~12, ->30
    9    23    >   INIT_FCALL_BY_NAME                                       'array_key_exists_recursive'
         24        SEND_VAR_EX                                              !0
         25        SEND_VAR_EX                                              !3
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0  $13     
         28        FE_FREE                                                  $5
         29      > RETURN                                                   $13
    3    30    > > JMP                                                      ->4
         31    >   FE_FREE                                                  $5
   12    32      > RETURN                                                   null

End of function array_key_exists_recursive

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.3 ms | 1403 KiB | 16 Q