3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace one; class DemoFile { protected bool $test = false; public function init(): void { $this->test = true; } } namespace two; class FirstChild extends one\DemoFile { } namespace two; class SecondChild extends FirstChild { protected bool $foo = false; public function init(): void { parent::init(); $this->foo = true; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LeXsi
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'two%5Cfirstchild', 'two%5Cone%5Cdemofile'
   16     1        DECLARE_CLASS                                            'two%5Csecondchild', 'two%5Cfirstchild'
   22     2      > RETURN                                                   1

Class one\DemoFile:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LeXsi
function name:  init
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'test'
          1        OP_DATA                                                  <true>
   10     2      > RETURN                                                   null

End of function init

End of class one\DemoFile.

Class two\FirstChild: [no user functions]
Class two\SecondChild:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LeXsi
function name:  init
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'init'
          1        DO_FCALL                                      0          
   20     2        ASSIGN_OBJ                                               'foo'
          3        OP_DATA                                                  <true>
   21     4      > RETURN                                                   null

End of function init

End of class two\SecondChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.25 ms | 1433 KiB | 13 Q