Re: 5.4 regression: non-existent sub-sub keys now have values
| From: | Ferenc Kovacs | Date: | Wed, 23 Nov 2011 15:21:07 +0000 |
| Subject: | Re: 5.4 regression: non-existent sub-sub keys now have values | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56511@lists.php.net to get a copy of this message | ||
On Wed, Nov 23, 2011 at 4:04 PM, Daniel Convissor <
danielc@analysisandsolutions.com> wrote:
> Hi Ferenc:
>
> [And the manual saaaays...]
> > "Non-integer types are converted to integer."
> > So it is a documented behavior, so the current change is just a bugfix
> imo.
>
> Can someone please lend me their time machine so I can go back and tell
> folks to just use {} for string offsets and [] for arrays? I'll
> only need it for a few minutes.
offtopic:
I used to preach about using {} for string offsets and that [] is
deprecated then we had that reversed in the documentation/5.3 migration
guide ("The use of {} to access string offsets is deprecated. Use []
instead.")...
Fortunately it turned out to be a mistake, and got fixed in the docs, since
then we document both behavior (albeit the [] seems to be preferred way in
the docs), and none of them triggers E_DEPRECATED.
So I think that it is the reason why people still use [] for string offsets..
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu