The sum() method calculate the sum of values in an array
Last updated 4 years ago
<?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;