3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function foo(); } interface B extends A { public function baz(); } interface C extends B { public function bar(); } abstract class Test implements C { } $refClass = new ReflectionClass(Test::class); var_dump($refClass->getInterfaces());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y6cD1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $refClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'b'
   11     1        DECLARE_CLASS                                            'c'
   15     2        DECLARE_CLASS                                            'test'
   19     3        NEW                                              $1      'ReflectionClass'
          4        SEND_VAL_EX                                              'Test'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   20     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'getInterfaces'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function foo

End of class A.

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

End of function baz

End of class B.

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

End of function bar

End of class C.

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.03 ms | 1395 KiB | 15 Q