← All docs

__elephc_bcnumber_add() - internals

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

__elephc_bcnumber_add() - internals

Where it lives

Lowering notes

  • Uses the runtime_call strategy from the single-source builtin descriptor.
  • Emits the typed EIR target runtime.__elephc_bcnumber_add through BuiltinLoweringContext.
  • The backend resolves that typed target through src/codegen/lower_inst/runtime_calls.rs; PHP builtin names do not participate in dispatch.

Semantic descriptor

  • Target strategy: runtime_call
  • Validation: signature
  • Result type source: declared
  • Result ownership: fresh
  • Effects: static (3 declared effects)
  • Requirements: static (1 requirements)
  • Callable policy: static_only
  • Target support: macos-aarch64, ios-arm64, ios-sim-arm64, linux-aarch64, linux-x86_64

EIR and runtime boundary

  • Typed EIR target: runtime.__elephc_bcnumber_add
  • Backend boundary: src/codegen/lower_inst/runtime_calls.rs resolves the typed target without PHP-name dispatch.

Signature summary

function __elephc_bcnumber_add(string $num1, string $num2, ?int $scale = null): string

What the type checker enforces

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

Eval interpreter (magician)

Not callable from eval’d code - the magician interpreter has no entry for this builtin.

Cross-references

  • No user-facing reference - this is a compiler internal helper.