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