3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait PropertyTrait { public $prop = 'default'; } abstract class A { use PropertyTrait; } class B extends A { public $prop = 'overridden'; public function write() { echo $this->prop; } } $b = new B(); $b->write();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z1USf
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'a'
   13     1        DECLARE_CLASS                                            'b', 'a'
   23     2        NEW                                              $1      'B'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   25     5        INIT_METHOD_CALL                                         !0, 'write'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class PropertyTrait: [no user functions]
Class A: [no user functions]
Class B:
Function write:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z1USf
function name:  write
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'prop'
          1        ECHO                                                     ~0
   20     2      > RETURN                                                   null

End of function write

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.46 ms | 1006 KiB | 13 Q