PHP is_finite () function
Examples
Determine whether a value is finite:
<?php
echo is_finite(2) . "<br>";
echo is_finite(log(0)) . "<br>";
echo is_finite(2000);
?>
echo is_finite(2) . "<br>";
echo is_finite(log(0)) . "<br>";
echo is_finite(2000);
?>
Running instance »
Definition and Usage
is_finite () function to determine whether a value is finite.
If the specified value is a finite value, the function returns true (1). Otherwise, it returns false / nothing.
If the value is on the native platform PHP floating point numbers are within the allowable range, the value is limited value.
grammar
is_finite( value );
参数 | 描述 |
---|---|
value | 必需。规定要检查的值。 |
technical details
return value: | If the value is a finite value, returns TRUE. Otherwise, it returns FALSE. |
---|---|
Return type: | Boolean |
PHP version: | 4.2+ |
PHP Math Reference