← All docs
array_product()
Calculate an integer or float product of array values; an empty array returns integer 1.
array_product()
function array_product(array $array): int|float
Calculate an integer or float product of array values; an empty array returns integer 1.
Parameters:
$array(array)
Returns: int|float
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/array_product.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how array_product is implemented in the compiler, see the internals page.