range()
function range(mixed $start, mixed $end, int $step = 1): array
Create an array containing a range of elements.
Parameters:
$start(mixed)$end(mixed)$step(int), default1, optional
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/range.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how range is implemented in the compiler, see the internals page.