Home >Backend Development >PHP Tutorial >php isset函数和empty函数学习

php isset函数和empty函数学习

WBOY
WBOYOriginal
2016-06-20 12:44:58913browse

isset :在php中如果变量被赋值为NULL,则表明变量被销毁掉了,所以如果变量为NULL时,isset为false,当然变量没有定义时isset也返回false,其他情况都返回true

empty:变量为0,NULL,不存在,“”,array(),等有空概念的的时候,就返回true,否则返回false

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn