Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Calculate the sum of values in an array
<?php array_sum(array $array): int|float
<?php     public function processColumns($results, $sql = '')

    {

        $hasPrimaryKey = array_sum(array_column($results, 'primary')) === 1;



        return array_map(function ($result) use ($hasPrimaryKey, $sql) {

            $result = (object) $result;
<?php         $this->assertDoesNotEnumerateCollection($data, function ($collection) {

            $collection->flatMap(function ($values) {

                return array_sum($values);

            });

        });