isset function of PHP

isset

(PHP 4, PHP 5)

issetDetermine if a variable is set and is not NULL

检查参数的值是否已经设置并且不为NULL。

 

Description

bool isset ( mixed $var [, mixed $... ] )

 

Determine if a variable is set and is not 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.

 

检查参数的值是否已经设置并且不为NULL。

如果参数调用unset()而不被设置,那它以后也不会被设置。如果参数设置为NULL,调用isset()会返回FALSE。而且NULL字节不等同PHP中NULL的常量值。

 

If multiple parameters are supplied then isset() will return TRUE only if all of the parameters are set. Evaluation goes from left to right and stops as soon as an unset variable is encountered.

如果想多个参数调用isset()返回TRUE,只有这些函数都被设置过。函数会从左向右检查所有的参数,一直遇到没有设置的或者参数集末尾。

 

Parameters

var    The variable to be checked.      被检查的参数。

...     Another variable ...                  另外的参数。

 

Return Values

Returns TRUE if var exists and has value other than NULL , FALSE otherwise.

假如参数存在或者不为空返回TRUE,其他返回FALSE。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值