Re: isset

From: Date: Mon, 16 Apr 2007 22:51:16 +0000
Subject: Re: isset
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-253072@lists.php.net to get a copy of this message
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?

« previous php.general (#253072) next »