Re: isset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, April 16, 2007 11:18 am, Jim Lucas wrote:
> these two lines are not the same infact, with the first, you will not
> get a E_NOTICE warning, but
> with the second you will.

I dunno what you are thinking of, but the manual says:

"empty() is the opposite of (boolean) var, except that no warning is
generated when the variable is not set."

I am reasonably certain that "empty", like "isset" is not, in fact, a
function, but is a language construct (like "if" and "foreach") and it
does not attempt to use the variable per se, so does not generate an
E_NOTICE.

I am also reasonably certain that this has been true since "empty"
debuted in the language, but won't swear to that in court.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux