← All docs

stream_wrapper_register()

Registers a URL wrapper implemented as a PHP class.

stream_wrapper_register()

function stream_wrapper_register(string $protocol, string $class, int $flags = 0): bool

Registers a URL wrapper implemented as a PHP class.

Parameters:

  • $protocol (string)
  • $class (string)
  • $flags (int), default 0, optional

Returns: bool

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

Internals

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