Skip to content

PHP 空值检查:"!" vs "is_null" vs "isset"

检查是否为 null 使用 === null 或者 is_null

检查不为 null 使用 !== nullis_set();

empty()isset() 判断数组的键值是否存在

参考:

https://laraveldaily.com/post/php-check-for-empty-values-not-is-null-vs-isset

亲手创建自己所需的软件,是程序员的幸运。