3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Menu extends BaseMenu { private $test; public function __construct() { parent::__construct(); $this->test = "sdsad"; } } class BaseMenu { protected $module = ''; /** * @ignore */ public function __construct() { $this->module = $this->getModule(); } private function getModule() { $className = get_class($this); $className = explode('\\', $className); return $className[2]; } } $menu = new Menu();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pt5vb
function name:  (null)
number of ops:  5
compiled vars:  !0 = $menu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'menu', 'basemenu'
   34     1        NEW                                              $1      'Menu'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class Menu:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pt5vb
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
    9     2        ASSIGN_OBJ                                               'test'
          3        OP_DATA                                                  'sdsad'
   10     4      > RETURN                                                   null

End of function __construct

End of class Menu.

Class BaseMenu:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pt5vb
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_METHOD_CALL                                         'getModule'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN_OBJ                                               'module'
          3        OP_DATA                                                  $1
   23     4      > RETURN                                                   null

End of function __construct

Function getmodule:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pt5vb
function name:  getModule
number of ops:  11
compiled vars:  !0 = $className
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   FETCH_THIS                                       ~1      
          1        GET_CLASS                                        ~2      ~1
          2        ASSIGN                                                   !0, ~2
   28     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%5C'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
   30     8        FETCH_DIM_R                                      ~6      !0, 2
          9      > RETURN                                                   ~6
   31    10*     > RETURN                                                   null

End of function getmodule

End of class BaseMenu.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.46 ms | 1396 KiB | 15 Q