3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { protected $_themeMap = [ "microsite" => [ "toc" => "microsite", "global-ui" => "microsite" ] ]; public function getTOCFromTheme($theme) { if(array_key_exists($theme, $this->themeMap) && array_key_exists("toc", $this->themeMap[$theme])) { return $this->$themeMap[$theme]["toc"]; } else { return "default"; } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V02kG
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   1

Class TestClass:
Function gettocfromtheme:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/V02kG
function name:  getTOCFromTheme
number of ops:  16
compiled vars:  !0 = $theme, !1 = $themeMap
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        FETCH_OBJ_R                                      ~2      'themeMap'
          2        ARRAY_KEY_EXISTS                                 ~3      !0, ~2
          3      > JMPZ_EX                                          ~3      ~3, ->8
          4    >   FETCH_OBJ_R                                      ~4      'themeMap'
          5        FETCH_DIM_R                                      ~5      ~4, !0
          6        ARRAY_KEY_EXISTS                                 ~6      'toc', ~5
          7        BOOL                                             ~3      ~6
          8    > > JMPZ                                                     ~3, ->14
   15     9    >   FETCH_OBJ_R                                      ~7      !1
         10        FETCH_DIM_R                                      ~8      ~7, !0
         11        FETCH_DIM_R                                      ~9      ~8, 'toc'
         12      > RETURN                                                   ~9
         13*       JMP                                                      ->15
   17    14    > > RETURN                                                   'default'
   19    15*     > RETURN                                                   null

End of function gettocfromtheme

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.39 ms | 1394 KiB | 13 Q