← All docs

interface_exists()

Checks if the interface has been defined.

interface_exists()

function interface_exists(string $interface, bool $autoload = true): bool

Checks if the interface has been defined.

Parameters:

  • $interface (string)
  • $autoload (bool), default true, optional

Returns: bool

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how interface_exists is implemented in the compiler, see the internals page.