PHP is_infinite() Function
Definition and Usage
is_infinite() determines whether it is an infinite value.
Syntax
is_infinite(x)
Parameter | Description |
---|---|
x | Required. Specifies the value to be checked. |
Description
If x Returns true for infinity (positive or negative), such as the result of log(0) or any value that exceeds the floating-point number range of this platform.
Example
<?php echo is_infinite(2); echo is_infinite(log(0)); echo is_infinite(2000); ?>
Output:
1