Re: 5.4 regression: non-existent sub-sub keys now have values
| From: | Etienne Kneuss | Date: | Wed, 23 Nov 2011 02:26:07 +0000 |
| Subject: | Re: 5.4 regression: non-existent sub-sub keys now have values | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56478@lists.php.net to get a copy of this message | ||
Hi,
AFAIK this is one of the change that was explicitly put in to make it
more consistent.
Before, you had:
$string = "asd";
$string[0] == "a"
but:
$string[0][0] == Fatal: cannot use string offset as an array
while $string[0] == "a", it makes no sense for $string[0][0] not to
return "a" again, since
$str = "a";
$str[0] == "a";
Best Regards,
On Wed, Nov 23, 2011 at 02:50, Daniel Convissor
<danielc@analysisandsolutions.com> wrote:
> Hi Folks:
>
> I just stumbled upon a regression in 5.4. In an array, a sub-sub-key of
> an existing key is now returning a letter of the value indexed by the
> main key. I'm raising it here so it doesn't get lost.
>
> https://bugs.php.net/bug.php?id=60362
>
> Thanks,
>
> --Dan
>
> --
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> data intensive web and database programming
> http://www.AnalysisAndSolutions.com/
> 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Etienne Kneuss
http://www.colder.ch