← All docs

ftruncate() — internals

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

ftruncate() — internals

Where it lives

Lowering notes

  • Lowers ftruncate(stream, size) through the shared fd truncate runtime helper.

Runtime helpers

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

Signature summary

function ftruncate(resource $stream, int $size): bool

What the type checker enforces

  • Arity: takes exactly 2 arguments.

Eval interpreter (magician)

Cross-references