Determine whether a value is infinite:
<?php echo is_infinite ( 2 ) . " <br> " ; echo is_infinite ( log ( 0 ) ) . " <br> " ; echo is_infinite ( 2000 ) ; ?>The is_infinite() function determines whether a value is infinite.
If the specified value is a finite value, the function returns TRUE (1). Otherwise, it returns FALSE (no output).
The value is infinite if it is within the range allowed by PHP floating point numbers on the native platform.
is_infinite( value );
parameter | describe |
---|---|
value | Required. Specifies the value to be checked. |
Return value: | If value is infinite, returns TRUE. Otherwise return FALSE. |
---|---|
Return type: | Boolean |
PHP version: | 4.2+ |