You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accepts a list or array of real numbers and returns the arithmetic mean (also known as the average) by calculating the sum and dividing by the total count.
average() is an alias of mean()
Usage
average(array|integer|float ...$args): float
Parameters
args (array|integer|float)
: A list or array of real numbers.
Return Value
(float)
: Returns the mean (also known as the average) of all real numbers.
: Returns 0 if the input is empty.