PHP is_infinite() Function
Definition and Usage
is_infinite() determines whether a value is infinite.
Syntax
is_infinite(x)
Parameter | Description |
---|---|
x | Required. Specifies the value to be checked. |
Description
If x Returns true if the value is infinite (positive or negative), such as the result of log(0) or any value beyond 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