← All docs

rename() — internals

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

rename() — internals

Where it lives

Lowering notes

  • Lowers rename(from, to) through the target-aware runtime helper.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_glob
  • __rt_scandir
  • __rt_tempnam

Signature summary

function rename(string $from, string $to): bool

What the type checker enforces

  • Arity: takes exactly 2 arguments.

Eval interpreter (magician)

Cross-references