Hi,
On Tue, May 1, 2012 at 18:43, Ferenc Kovacs <[email protected]> wrote:
>
> albeit I'm not laruence, but I also supported the idea to keep consistency
> across the allowed params of empty and isset.
> here is my reasoning:
> - both isset and empty are language constructs, which many people use
> almost interchangeability, changing one of them in a way that the same
> expression works with one of them, but blows up with a parse error seems
> wrong to me.
> - maybe you think that isset doesn't really make sense with expressions,
> but don't forget that this patch would also allow constants to be used with
> empty/isset, and imo isset(some_constant); would be useful and maybe more
> straightforward for the people new to the language.
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.
Best regards,
--
Etienne Kneuss
http://www.colder.ch
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php