Home >>PHP Math Functions >PHP is_infinite() Function
PHP is_infinite() function is used to check whether the given input value is infinite or not. It takes only a single parameter that is the value to be checked. It returns a Boolean value TRUE (1) if the specified input is an infinite number, otherwise it returns false or nothing. The given input value is infinite if it is outside the allowed range for a PHP float.
Syntax:
is_infinite($value);
Parameter | Description |
---|---|
value | This is a required parameter. This parameter defines the value to check. |
Here is an example of is_infinite() function in PHP:
<html> <body> <?php echo is_infinite(0)."<br>"; echo is_infinite(M_PI_2)."<br>"; echo is_infinite(log(0))."<br>"; ?> </body> </html>