← All docs

json_decode() — internals

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

json_decode() — internals

Where it lives

Lowering notes

  • Lowers json_decode(json, associative?, depth?, flags?) through the shared JSON decoder runtime.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_json_decode_mixed

Signature summary

function json_decode(string $json, bool $associative = null, int $depth = 512, int $flags = 0): mixed

What the type checker enforces

  • Arity: takes 1–4 arguments (3 optional).

Cross-references