is_infinite

(PHP 4 >= 4.2.0, PHP 5)

is_infinite -- Finds whether a value is infinite

Description

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.

See also is_finite() and is_nan().



is_infinite
david(@t)nirvanis(d@t)org
31-Aug-2004 02:49
If you have PHP lower than 4.2 you can simulate the behaviour:

function is_infinite($value) {
   return (substr("$value",-3) == "INF");
}

(tested on php 4.1.2)

<is_finiteis_nan>
 Last updated: Tue, 15 Nov 2005