美文网首页
empty 和 isset

empty 和 isset

作者: two_steps | 来源:发表于2018-02-01 10:59 被阅读0次

    empty 判断变量的值或者数组是不是空

    为空返回true,不为空返回false

    $str的值为  0  '0'  ''  null false  都判定为空

    isset  判断变量,数组是否存在

    存在返回true   不存在返回false

    在判定变量,数组是否为真的时候

    变量的值为0  或者是空字符串    数组为空数组  都判定不是真

    相关文章

      网友评论

          本文标题:empty 和 isset

          本文链接:https://www.haomeiwen.com/subject/nvtdzxtx.html