is_infinite
is_infinite
Checks whether a float is infinite
bool **is_infinite** float $num
Returns whether the given is either
or -.
num``INF``INF
numThe float to check
true if is either
or -, else false.
num``INF``INF
Voorbeeld: example
<?php
$inf = 1e308 * 2;
var_dump($inf, is_infinite($inf));
$negative_inf = -$inf;
var_dump($negative_inf, is_infinite($negative_inf));
?>
float(INF)
bool(true)
float(-INF)
bool(true)
is_finite``is_nan