Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
public static function MAX(...$args)
    {
        $returnValue = null;

        // Loop through arguments
        $aArgs = Functions::flattenArray($args);
        foreach ($aArgs as $arg) {
            // Is it a numeric value?
            if ((is_numeric($arg)) && (!is_string($arg))) {
                if (($returnValue === null) || ($arg > $returnValue)) {
                    $returnValue = $arg;
                }
            }
        }

        if ($returnValue === null) {
            return 0;
        }

        return $returnValue;
    }
public static function MAX(...$args)
    {
        $returnValue = null;

        // Loop through arguments
        $aArgs = Functions::flattenArray($args);
        foreach ($aArgs as $arg) {
            // Is it a numeric value?
            if ((is_numeric($arg)) && (!is_string($arg))) {
                if (($returnValue === null) || ($arg > $returnValue)) {
                    $returnValue = $arg;
                }
            }
        }

        if ($returnValue === null) {
            return 0;
        }

        return $returnValue;
    }
public static function MAX ( ... $ args ) { $ returnValue = null ; // Loop through arguments $ aArgs = Functions :: flattenArray ( $ args ) ; foreach ( $ aArgs as $ arg ) { // Is it a numeric value? if ( ( is_numeric ( $ arg ) ) && ( ! is_string ( $ arg ) ) ) { if ( ( $ returnValue === null ) || ( $ arg > $ returnValue ) ) { $ returnValue = $ arg ; } } } if ( $ returnValue === null ) { return 0 ; } return $ returnValue ; }
MAX.

MAX returns the value of the element of the values passed that has the highest value,
with negative numbers considered smaller than positive numbers.

Excel Function:
MAX(value1[,value2[, ...]])

@category Statistical Functions

@param mixed ...$args Data values

@return float
MAX .