← All docs

rewind() — internals

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

rewind() — internals

Where it lives

Lowering notes

  • Lowers rewind(stream) as lseek(fd, 0, SEEK_SET) and clears EOF state on success.

Runtime helpers

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

Signature summary

function rewind(resource $stream): bool

What the type checker enforces

  • Arity: takes exactly 1 argument.

Eval interpreter (magician)

Cross-references