← All docs

array_sum()

Calculate the sum of values in an array.

array_sum()

function array_sum(array $array): int

Calculate the sum of values in an array.

Parameters:

  • $array (array)

Returns: int

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how array_sum is implemented in the compiler, see the internals page.