FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » loose thinking
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: loose thinking [message #176795 is a reply to message #176785] Wed, 25 January 2012 03:49 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Peter H. Coffin wrote:

> On Tue, 24 Jan 2012 14:32:52 +0100, M. Strobel wrote:
>> Okay I see it is well documented. I just started testing.
>>
>> I am angry about it because not even isset() respects the null value
>> here. I think it makes more sense this way: isset($a[null]) should
>> return false, because there is no null index.
>
> Parens change precedence. Even on functions.

You are missing the point, which is: `null' is being converted to the
primitive string value ''. A key of an *associative* array may be the empty
string. And that is good so.

What is questionable here is the implicit type conversion of non-numeric
values to string. But PHP is not alone there, so this behavior can be
expected. It might be nice if E_STRICT reported such spurious conversions
or there was an even stricter mode that forbade them. Perhaps in PHP 6 …


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Open Source Customization
Next Topic: Product page getting Redirect back to Home page - Please Fix
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 11:36:11 GMT 2024

Total time taken to generate the page: 0.04224 seconds