← All docs

fopen() — internals

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

fopen() — internals

Where it lives

Lowering notes

  • Lowers fopen(filename, mode) and boxes stream resources or PHP false.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_tmpfile

Signature summary

function fopen(string $filename, string $mode, bool $use_include_path = false, mixed $context = null): mixed

What the type checker enforces

  • Arity: takes 2–4 arguments (2 optional).

Eval interpreter (magician)

Cross-references