3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace CParent { class Helper{} class Test{ /** * @var Helper */ public $helper; public function __construct() { $this->helper = new Helper(); } } } namespace Child { class Helper{} class Test extends \CParent\Test {} } namespace { $qwe = new Child\Test(); var_dump($qwe); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MQV1Y
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        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   30     6      > RETURN                                                   1

Class CParent\Helper: [no user functions]
Class CParent\Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MQV1Y
function name:  __construct
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 __construct

End of class CParent\Test.

Class Child\Helper: [no user functions]
Class Child\Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MQV1Y
function name:  __construct
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 __construct

End of class Child\Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.9 ms | 1395 KiB | 15 Q