3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Base { public static function foo() { return 'Base'; } } trait T { public static function foo() { return 'T'; } } class Foo extends Base { use T; } echo Foo::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dtd8Q
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'foo', 'base'
   19     1        INIT_STATIC_METHOD_CALL                                  'Foo', 'foo'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Class Base:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dtd8Q
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'Base'
    6     1*     > RETURN                                                   null

End of function foo

End of class Base.

Class T:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dtd8Q
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'T'
   12     1*     > RETURN                                                   null

End of function foo

End of class T.

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.18 ms | 1393 KiB | 13 Q