PHP is_null() 和 ==null

标签 php null

<分区>

在PHP中,is_null==null有什么区别?两者都返回true的条件是什么?

最佳答案

is_null=== null 相同。当变量为 null(或未设置)时,两者都返回 true。

请注意,我使用的是 === 而不是 ===== 比较类型和值。

关于PHP is_null() 和 ==null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9671659/

相关文章:

java - 关于 null 的 Comparable 和 Comparator 契约(Contract)

swift - 尝试分配给可选属性时类型不匹配

c# - 使用 Google 文档 API

php - 如何处理返回到 jQuery/JSON 对象的 MySQL 结果的分页

php - 如何在 MySQL 中构建动态数据?

ios - 使用有效的 UIImage 设置 UIImageView.image 在 swift 中创建 "nil"错误

java - 检查对象中的元素是否为空

postgresql - 如何在 postgresql 交叉表中用零替换空值

php - PHP 中的 XTEA 加密和 C 中的解密

php - 转义特殊字符