← All docs

flock() — internals

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

flock() — internals

Where it lives

Lowering notes

  • Lowers flock(stream, operation, would_block?) through the libc flock wrapper.

Runtime helpers

No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.

Signature summary

function flock(resource $stream, int $operation, bool $would_block = null): bool

What the type checker enforces

  • Arity: takes 2–3 arguments (1 optional).
  • By-reference parameters: $would_block.

Eval interpreter (magician)

Cross-references