3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace CParent { class Helper{} class Test{ /** * @var Helper */ public $helper; public function __construnct() { $this->helper = new Helper(); } } } namespace Child { class Helper{} class Test extends \CParent\Test {} } namespace { $qwe = new Child\Test(); echo get_class($qwe->helper); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UUn35
function name:  (null)
number of ops:  7
compiled vars:  !0 = $qwe
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'Child%5CTest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        FETCH_OBJ_R                                      ~4      !0, 'helper'
          4        GET_CLASS                                        ~5      ~4
          5        ECHO                                                     ~5
   30     6      > RETURN                                                   1

Class CParent\Helper: [no user functions]
Class CParent\Test:
Function __construnct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UUn35
function name:  __construnct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'CParent%5CHelper'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'helper'
          3        OP_DATA                                                  $1
   15     4      > RETURN                                                   null

End of function __construnct

End of class CParent\Test.

Class Child\Helper: [no user functions]
Class Child\Test:
Function __construnct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UUn35
function name:  __construnct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'CParent%5CHelper'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'helper'
          3        OP_DATA                                                  $1
   15     4      > RETURN                                                   null

End of function __construnct

End of class Child\Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.09 ms | 1394 KiB | 13 Q