3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { private static $_OBJECTS; public static function Get() { self::$_OBJECTS[1] = new ChildClass(); return self::$_OBJECTS[1]; } } class ChildClass extends ParentClass { public $Manager; function __construct() { $this->Manager = $this; } public static function &GetCurrent() { return ChildClass::Get(); } public static function &Get() { return parent::Get(); } } $staff = ChildClass::GetCurrent();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhUY0
function name:  (null)
number of ops:  4
compiled vars:  !0 = $staff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   INIT_STATIC_METHOD_CALL                                  'ChildClass', 'GetCurrent'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class ParentClass:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhUY0
function name:  Get
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'ChildClass'
          1        DO_FCALL                                      0          
          2        FETCH_STATIC_PROP_W          global              $0      '_OBJECTS'
          3        ASSIGN_DIM                                               $0, 1
          4        OP_DATA                                                  $2
   10     5        FETCH_STATIC_PROP_R          unknown             ~4      '_OBJECTS'
          6        FETCH_DIM_R                                      ~5      ~4, 1
          7      > RETURN                                                   ~5
   11     8*     > RETURN                                                   null

End of function get

End of class ParentClass.

Class ChildClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhUY0
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_THIS                                       ~1      
          1        ASSIGN_OBJ                                               'Manager'
          2        OP_DATA                                                  ~1
   21     3      > RETURN                                                   null

End of function __construct

Function getcurrent:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/lhUY0
function name:  GetCurrent
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_STATIC_METHOD_CALL                                  'ChildClass', 'Get'
          1        DO_FCALL                                      0  $0      
          2      > RETURN_BY_REF                                            $0
   26     3*     > RETURN_BY_REF                                            null

End of function getcurrent

Function get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/lhUY0
function name:  Get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_STATIC_METHOD_CALL                                  'Get'
          1        DO_FCALL                                      0  $0      
          2      > RETURN_BY_REF                                            $0
   31     3*     > RETURN_BY_REF                                            null

End of function get

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.63 ms | 1395 KiB | 13 Q