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; use one; 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/mkB72
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E > > 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/mkB72
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:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mkB72
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 two\FirstChild.

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

End of function init

End of class two\SecondChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.52 ms | 1433 KiB | 13 Q