PHP is_infinite() Function

The is_infinite() function checks whether a value is infinite or not.

This function returns true (1) if the specified value is an infinite number, otherwise it returns false/nothing.

The value is infinite if it is outside the allowed range for a PHP float on this platform.

bool is_infinite ( float $val )

Returns TRUE if val is infinite (positive or negative), like the result of log(0) or any value too big to fit into a float on this platform.

Example -

ParameterDescription
valThe value to check

Return Values-

TRUE if val is infinite, else FALSE.