3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ExpectsFooMethod { abstract public function foo(): string; } trait ProvidesFooMethod { use ExpectsFooMethod; public function foo(): string {} } final readonly class FooMethodImpl { use ProvidesFooMethod; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O5lIe
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'providesfoomethod'
   15     1        DECLARE_CLASS                                            'foomethodimpl'
   18     2      > RETURN                                                   1

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

End of function foo

End of class ExpectsFooMethod.

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

End of function foo

End of class ProvidesFooMethod.

Class FooMethodImpl: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.74 ms | 998 KiB | 13 Q