Re: Inconsistency of empty() and isset() ?
| From: | Pierre | Date: | Mon, 17 Apr 2006 00:38:41 +0000 |
| Subject: | Re: Inconsistency of empty() and isset() ? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-22806@lists.php.net to get a copy of this message | ||
On 4/17/06, Brian Moon <brianm@dealnews.com> wrote:
> > Indeed, especially as everyone will tell you that isset and empty are
> > equivalent.
>
>
> Are you saying that people misunderstand that or that you believe that
> to be true? I see that misunderstanding a lot. I have to educate
> people on that. They don't seem to grok the subtle, yet crucial (and I
> believe, wonderful) difference between the two.
I was not clear :)
isset and empty share the same implementation, the only difference is
what they return (in short). They behave "the same", they should
continue do so if empty accept many arguments.
But this discussion just hence Derick's point, it is not that obvious
to bring consistency between the two functions.
--Pierre