更新时间:2023-11-28 10:28:34
bool isset ( mixed $var [, mixed $var [, $... ]] )
确定是否设置了变量并且该变量不为NULL.
Determine if a variable is set and is not NULL.
如果已使用unset()取消设置了变量,则将不再设置该变量.如果测试已设置为NULL的变量, isset()将返回FALSE .另外请注意,NULL字节(\ 0)不等于PHP NULL常量.
If a variable has been unset with unset(), it will no longer be set. isset() will return FALSE if testing a variable that has been set to NULL. Also note that a NULL byte ("\0") is not equivalent to the PHP NULL constant.
返回值
如果var存在并且具有非NULL的值,则返回TRUE,否则返回FALSE.
Returns TRUE if var exists and has value other than NULL, FALSE otherwise.
From the manual. Examples on the same page.