← All docs

basename() — internals

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

basename() — internals

Where it lives

Lowering notes

  • Lowers basename(path, suffix?) through the target-aware runtime helper.

Runtime helpers

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

Signature summary

function basename(string $path, string $suffix = ''): string

What the type checker enforces

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

Cross-references