← All docs
__elephc_array_rand() - internals
Compiler internals for __elephc_array_rand(): lowering path, type checks, and runtime helpers.
__elephc_array_rand() - internals
Where it lives
- Signature:
crates/elephc-builtin-contract/src/catalog_data.rs - Lowering:
src/random_prelude.rs(__elephc_array_rand) - Function symbol:
__elephc_array_rand()
Lowering notes
- Implemented by the compiler-injected random prelude.
Semantic descriptor
Shared contract implemented by an injected elephc-PHP prelude.
EIR and runtime boundary
Implemented by an injected elephc-PHP prelude.
Signature summary
function __elephc_array_rand(array $array, int $num = 1): mixed
What the type checker enforces
- Arity: takes 1–2 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.