Re: [RFC] Allow non-variable arguments to empty() and isset()
| From: | Ferenc Kovacs | Date: | Tue, 01 May 2012 19:51:55 +0000 |
| Subject: | Re: [RFC] Allow non-variable arguments to empty() and isset() | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60405@lists.php.net to get a copy of this message | ||
>
>
> So isset(UNDEFINEDCONSTANT) will be isset("UNDEFINEDCONSTANT") which
> will/should
> 1) yield a notice, which is unnexpected for isset
> 2) return true, which is also unexpected.
>
> I don't see much point in that.
>
>
yep, and if we allow expressions then it is the expected behavior, but you
are right that this is will change the current standard that isset/empty
can't raise a notice.
but this isn't specific to isset, empty will also follow the same pattern.
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu