is_infinite(): Finds whether a value is infinite or not

Check whether a float is infinite

is_infinite() checks whether a floating-point result represents positive or negative infinity.

$value = INF;
var_dump(is_infinite($value)); // bool(true)

Use is_infinite() when a calculation may overflow to INF or -INF.

var_dump(is_infinite(2.0));      // bool(false)
var_dump(is_infinite(INF));            // bool(true)
var_dump(is_infinite(-INF));           // bool(true)
var_dump(is_infinite(log(0)));   // bool(true)
Syntax
bool is_infinite(float $num)
ParameterDESCRIPTION
$inputRequired : Number to check.

Returns true only for INF or -INF; finite values and NAN return false.


Math Functions is_finite(): to findout legal finite number or not is_nan(): check NAN


Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer