public function max($subject, $max) : bool
    {
        if (!is_int($max) && !is_float($max)) {
            throw new InvalidArgumentException('Arg max type[' . Utils::getType($max) . '] is not integer or float.');
        }
        if ($subject === null) {
            return false;
        }
        return $subject <= $max;
    }
public function max($subject, $max) : bool
    {
        if (!is_int($max) && !is_float($max)) {
            throw new InvalidArgumentException('Arg max type[' . Utils::getType($max) . '] is not integer or float.');
        }
        if ($subject === null) {
            return false;
        }
        return $subject <= $max;
    }
public function max ( $ subject , $ max ) : bool { if ( ! is_int ( $ max ) && ! is_float ( $ max ) ) { throw new InvalidArgumentException ( 'Arg max type[' . Utils :: getType ( $ max ) . '] is not integer or float.' ) ; } if ( $ subject === null ) { return false ; } return $ subject <= $ max ; }
Numeric maximum.

May produce false negative if args subject and max both are float;
comparing floats is inherently imprecise.

@see Validate::number()
@see Validate::integer()
@see Validate::float()
@see Validate::numeric()
@see Validate::digit()

@param mixed $subject
@param int|float $max
Stringed number is not accepted.

@return bool

@throws InvalidArgumentException
Arg max not integer or float.
Numeric maximum .