美文网首页
[php]empty和isset校验参数时的区别

[php]empty和isset校验参数时的区别

作者: 杨肆月 | 来源:发表于2020-03-24 16:51 被阅读0次

无传参时,值为null
empty: true
!isset: true

有传参,无传值,(xx=),值为""
empty: true
!isset: false

有传参,传值为0,(xx=0),值为“0” string类型
empty: true
!isset: false

有传参,传值为非0,(xx=abc),值为“abc” string类型
empty: false
!isset: false

相关文章

网友评论

      本文标题:[php]empty和isset校验参数时的区别

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