← All docs

opendir() — internals

Compiler internals for opendir(): lowering path, type checks, and runtime helpers.

opendir() — internals

Where it lives

Lowering notes

  • Lowers opendir(path) and boxes the directory stream as resource|false.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_opendir
  • __rt_readdir
  • __rt_user_wrapper_dir_readdir

Signature summary

function opendir(string $directory): mixed

What the type checker enforces

  • Arity: takes exactly 1 argument.

Eval interpreter (magician)

Cross-references