3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'a' => '', 'b' => '', 'c' => array( 'd' => '', 'e' => '', 'f' => array( 'g' => '', 'h' => '', 'i' => '', ), ), ); echo (_array_key_exists_r($array, 'a')) ? 'aye' : 'nah'; function _array_key_exists_r($array, $key) { foreach ($array as $index => $subarray) { if ($index == $key) return TRUE; elseif (is_array($subarray)) return _array_key_exists_r($subarray, $key); } return FALSE; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K52cO
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL_BY_NAME                                       '_array_key_exists_r'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              'a'
          4        DO_FCALL                                      0  $2      
          5      > JMPZ                                                     $2, ->8
          6    >   QM_ASSIGN                                        ~3      'aye'
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~3      'nah'
          9    >   ECHO                                                     ~3
   25    10      > RETURN                                                   1

Function _array_key_exists_r:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/K52cO
function name:  _array_key_exists_r
number of ops:  22
compiled vars:  !0 = $array, !1 = $key, !2 = $subarray, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   20     2      > FE_RESET_R                                       $4      !0, ->19
          3    > > FE_FETCH_R                                       ~5      $4, !2, ->19
          4    >   ASSIGN                                                   !3, ~5
   21     5        IS_EQUAL                                                 !3, !1
          6      > JMPZ                                                     ~7, ->10
          7    >   FE_FREE                                                  $4
          8      > RETURN                                                   <true>
          9*       JMP                                                      ->18
   22    10    >   TYPE_CHECK                                  128          !2
         11      > JMPZ                                                     ~8, ->18
         12    >   INIT_FCALL_BY_NAME                                       '_array_key_exists_r'
         13        SEND_VAR_EX                                              !2
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $9      
         16        FE_FREE                                                  $4
         17      > RETURN                                                   $9
   20    18    > > JMP                                                      ->3
         19    >   FE_FREE                                                  $4
   24    20      > RETURN                                                   <false>
   25    21*     > RETURN                                                   null

End of function _array_key_exists_r

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.36 ms | 1399 KiB | 13 Q