PHP is_nan() 函数

定义和用法
is_nan() 判断是否为合法数值。
语法
is_nan(x)
参数 | 描述 |
---|---|
x | 必需。规定要检查的值。 |
说明
如果 xi> 为“非数值”,例如 acos(1.01) 的结果,则返回 true。
例子
<?php
echo is_nan(200);
echo is_nan(acos(1.01));
?>
echo is_nan(200);
echo is_nan(acos(1.01));
?>
输出:
1

is_nan() 判断是否为合法数值。
参数 | 描述 |
---|---|
x | 必需。规定要检查的值。 |
如果 xi> 为“非数值”,例如 acos(1.01) 的结果,则返回 true。
输出: