Michael Favia wrote:
Karoly Negyesi wrote:
empty and isset are the same speed and do not throw notices. if something is not set or NULL, then isset is TRUE. if something is not set or NULL or empty array, 0 or '' or '0' then empty is TRUE. And by TRUE he means FALSE. Or possibly !isset() or !empty(). You get the point. To be clear the following two statements are both TRUE:
If something is not set or NULL, then isset() is FALSE. if something is not set or NULL or empty array, 0 or '' or '0' then empty() is FALSE. If something is not set or NULL, then !isset() is TRUE. if something is not set or NULL or empty array, 0 or '' or '0' then !empty() is TRUE.
That is all.
Hah, and by FALSE, you mean TRUE ;) isset() cannot be FALSE the same time empty() is FALSE, which is what you have written above... Look here for extended information: http://www.blueshoes.org/en/developer/php_cheat_sheet/ Gabor