Skip to content

Compiled interface

Structure of the generated interface#

PHP interfaces are compiled into corresponding CLR types. The sample below depicts a PHP interface and resulting CLR type decompiled into C# language.

interface I {
  // ...
[PhpType("I", "index.php")]
public interface I {
  // ...


The type is annotated with [PhpTypeAttribute]. The attribute contains fully qualified PHP interface name and relative file path where it was declared.