[development] Notice
Ray Zimmerman
rz10 at cornell.edu
Tue Mar 27 19:50:55 UTC 2007
On Mar 27, 2007, at 1:02 PM, Gabor Hojtsy wrote:
> 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...
... except when '' actually isn't empty [1], [2].
[1] http://lists.drupal.org/archives/support/2007-03/msg00074.html
[2] http://drupal.org/node/128778
--
Ray Zimmerman
Senior Research Associate
428-B Phillips Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645
More information about the development
mailing list