Check whether a value is finite or not:
<?php
echo is_finite(2) . "<br>";
echo is_finite(log(0)) . "<br>";
echo is_finite(2000);
?>
Try it Yourself »
The is_finite() function checks whether a value is finite or not.
This function returns true (1) if the specified value is a finite number, otherwise it returns false/nothing.
The value is finite if it is within the allowed range for a PHP float on this platform.
is_finite(
value);
Parameter | Description |
---|---|
value | Required. Specifies the value to check |
Return Value: | TRUE if value is a finite number, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.2+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!