Re: [RFC] Allow non-variable arguments to empty() and isset()
| From: | Xinchen Hui | Date: | Wed, 02 May 2012 01:31:10 +0000 |
| Subject: | Re: [RFC] Allow non-variable arguments to empty() and isset() | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60408@lists.php.net to get a copy of this message | ||
Sent from my iPhone
在 2012-5-2,3:52,Ferenc Kovacs <tyra3l@gmail.com> 写道:
>>
>>
>> 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..
>
This is really a issue .
Thanks
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu