3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class A { public function writeFromA(): void { $this->prop = 'a'; } } final class B extends A { public readonly string $prop; } $object = new B(); $object->writeFromA();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XFLc4
function name:  (null)
number of ops:  6
compiled vars:  !0 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   NEW                                                  $1      'B'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   17     3        INIT_METHOD_CALL                                             !0, 'writeFromA'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class A:
Function writefroma:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XFLc4
function name:  writeFromA
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                                   'prop'
          1        OP_DATA                                                      'a'
    8     2      > RETURN                                                       null

End of function writefroma

End of class A.

Class B:
Function writefroma:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XFLc4
function name:  writeFromA
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                                   'prop'
          1        OP_DATA                                                      'a'
    8     2      > RETURN                                                       null

End of function writefroma

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.82 ms | 475 KiB | 7 Q