← All docs

closedir() — internals

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

closedir() — internals

Where it lives

Lowering notes

  • Lowers closedir(dir_handle) for libc, glob, and userspace-wrapper handles.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_closedir
  • __rt_rewinddir
  • __rt_user_wrapper_dir_closedir
  • __rt_user_wrapper_dir_rewinddir

Signature summary

function closedir(resource $dir_handle): void

What the type checker enforces

  • Arity: takes exactly 1 argument.

Cross-references