sum()
The sum() method calculate the sum of values in an array
Last updated
The sum() method calculate the sum of values in an array
<?php use kim\present\utils\arrays\ArrayUtils;
$arrayUtils = ArrayUtils::from(range(1, 10));
$arrayUtils->sum();// expected output: 55$arrayUtils->sum() : int|float;The sum of values as an integer or float
ArrayUtils::sumFrom(iterable $from) : int|float;Last updated