product.php
Table of Contents
Functions
- product() : string
- Return the product of the values in an array.
Functions
product()
Return the product of the values in an array.
product(mixed $numArray) : string
This helper wraps the ArangoDB AQL function PRODUCT(numArray) which calculates
the product (multiplication) of all numeric values in the given array.
Example AQL usage:
PRODUCT([1, 2, 3, 4]) // returns 24 (1×2×3×4)
PRODUCT([5, 2]) // returns 10 (5×2)
PRODUCT([10]) // returns 10 (single value)
PRODUCT(doc.factors) // returns product of factors array
Parameters
- $numArray : mixed
-
Array expression containing numeric values to multiply.
Tags
Return values
string —The formatted AQL expression.