Comment on page
sum()
The sum() method calculate the sum of values in an array
Example.php
<?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 modified 3yr ago