【发布时间】:2011-11-29 07:11:22
【问题描述】:
我的理解是……
如果is_numeric($input) === true
然后
is_float($input) === true 或
is_int($input) === true 或
$input === 0 或
$input 是一个数字字符串(意味着如果它没有用引号括起来,它将满足前 3 个中的一个)。
准确吗?还有其他区别吗?
【问题讨论】:
-
阅读这个表格内容:php.net/manual/en/language.types.php也许这就是你要找的......
-
我想我对浮动是什么感到最困惑。我认为任何浮点数也是数字,但不是相反。