Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!feeder.erje.net!news.internetdienste.de!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2028906.az0AgUPcgG@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 25 Jan 2012 04:49:19 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: loose thinking Newsgroups: comp.lang.php References: <9o7h5fFu6rU1@mid.uni-berlin.de> <9o7q84F33fU1@mid.uni-berlin.de> Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 27 NNTP-Posting-Date: 25 Jan 2012 04:49:19 CET NNTP-Posting-Host: b7420144.newsspool2.arcor-online.net X-Trace: DXC=BTcg]D7H6beIkjb;<8iR=aA9EHlD;3Ycb4Fo<]lROoRa8kF 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 (404-comp.)