3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { public function b() { echo self::$name; } } class C { protected static $name="c"; use A; } class D extends C { protected static $name="d"; } $c = new D(); $c->b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pkgGa
function name:  (null)
number of ops:  8
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'c'
   23     1        DECLARE_CLASS                                            'd', 'c'
   30     2        NEW                                              $1      'D'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   32     5        INIT_METHOD_CALL                                         !0, 'b'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pkgGa
function name:  b
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'name'
          1        ECHO                                                     ~0
    9     2      > RETURN                                                   null

End of function b

End of class A.

Class C: [no user functions]
Class D: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.66 ms | 1393 KiB | 13 Q