Re: empty function and array indices

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

 



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

-- 
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