Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
public static function SUMIFS(...$args)
    {
        $arrayList = $args;

        // Return value
        $returnValue = 0;

        $sumArgs = Functions::flattenArray(array_shift($arrayList));

        while (count($arrayList) > 0) {
            $aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
            $conditions[] = Functions::ifCondition(array_shift($arrayList));
        }

        // Loop through each set of arguments and conditions
        foreach ($conditions as $index => $condition) {
            $aArgs = $aArgsArray[$index];

            // Loop through arguments
            foreach ($aArgs as $key => $arg) {
                if (!is_numeric($arg)) {
                    $arg = Calculation::wrapResult(strtoupper($arg));
                }
                $testCondition = '=' . $arg . $condition;
                if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
                    // Is it a value within our criteria
                    $returnValue += $sumArgs[$key];
                }
            }
        }

        // Return
        return $returnValue;
    }
public static function SUMIFS(...$args)
    {
        $arrayList = $args;

        // Return value
        $returnValue = 0;

        $sumArgs = Functions::flattenArray(array_shift($arrayList));

        while (count($arrayList) > 0) {
            $aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
            $conditions[] = Functions::ifCondition(array_shift($arrayList));
        }

        // Loop through each set of arguments and conditions
        foreach ($conditions as $index => $condition) {
            $aArgs = $aArgsArray[$index];

            // Loop through arguments
            foreach ($aArgs as $key => $arg) {
                if (!is_numeric($arg)) {
                    $arg = Calculation::wrapResult(strtoupper($arg));
                }
                $testCondition = '=' . $arg . $condition;
                if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
                    // Is it a value within our criteria
                    $returnValue += $sumArgs[$key];
                }
            }
        }

        // Return
        return $returnValue;
    }
SUMIFS.

Counts the number of cells that contain numbers within the list of arguments

Excel Function:
SUMIFS(value1[,value2[, ...]],condition)

@category Mathematical and Trigonometric Functions

@param mixed $args Data values
@param string $condition the criteria that defines which cells will be summed

@return float