3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($array, $default = null) { // to get $array['key1']['key2'] if (isset($array['key1']) && is_array($array['key1']) && isset($array['key1']['key2']) && is_array($array['key1']['key2'])) { return $array['key1']['key2']; } else { return $default; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/23c9i
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/23c9i
function name:  foo
number of ops:  23
compiled vars:  !0 = $array, !1 = $default
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    4     2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      !0, 'key1'
          3      > JMPZ_EX                                          ~2      ~2, ->7
          4    >   FETCH_DIM_R                                      ~3      !0, 'key1'
          5        TYPE_CHECK                                  128  ~4      ~3
          6        BOOL                                             ~2      ~4
          7    > > JMPZ_EX                                          ~2      ~2, ->11
    5     8    >   FETCH_DIM_IS                                     ~5      !0, 'key1'
          9        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      ~5, 'key2'
         10        BOOL                                             ~2      ~6
         11    > > JMPZ_EX                                          ~2      ~2, ->16
         12    >   FETCH_DIM_R                                      ~7      !0, 'key1'
         13        FETCH_DIM_R                                      ~8      ~7, 'key2'
         14        TYPE_CHECK                                  128  ~9      ~8
         15        BOOL                                             ~2      ~9
         16    > > JMPZ                                                     ~2, ->21
    6    17    >   FETCH_DIM_R                                      ~10     !0, 'key1'
         18        FETCH_DIM_R                                      ~11     ~10, 'key2'
         19      > RETURN                                                   ~11
         20*       JMP                                                      ->22
    8    21    > > RETURN                                                   !1
   10    22*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.6 ms | 1395 KiB | 13 Q