Re: empty function and array indices
| From: | Richard Lynch | Date: | Mon, 02 May 2005 01:09:11 +0000 |
| Subject: | Re: empty function and array indices | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-214303@lists.php.net to get a copy of this message | ||
On Sun, May 1, 2005 1:47 pm, Gabriel Birke said:
> Is empty() some kind of special function where the validity
> of indices is not checked?
Bingo!
That's rather the whole point of empty and isset. :-)
The behaviour of empty has changed over time, with various releases.
isset seems more "stable" in that regard, so I prefer to use that one.
Also, to me, philosophically and from an application logic perspective, I
generally want to do something different when some variable is not set at
all, as opposed to having "" in it. But that's maybe just me. :-)
YMMV
--
Like Music?
http://l-i-e.com/artists.htm