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