Re: 5.4 regression: non-existent sub-sub keys now have values

From: Date: Wed, 23 Nov 2011 19:13:48 +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-56526@lists.php.net to get a copy of this message
On Wed, Nov 23, 2011 at 7:57 PM, Stas Malyshev <smalyshev@sugarcrm.com>wrote: > Hi! > > > Unless I'm mistaken it seems that we have a clear and vicious BC break >> here, the kind of changes that are annoying to catch and does not >> > > No, we do not have a BC break here, we have a bugfix here that makes > string ops work consistently and only has a problem with completely broken > code. I am 100% opposed to changing anything there and re-breaking string > offsets because somebody uses string indexes to operate on strings and > expect them to work in weird ways that makes $a[0][0] work differently from > $b = $a[0]; $b[0]. If you use string offsets on strings, expect them to be > converted to numbers, it has been there since forever and only didn't work > on chained offsets because of a bug. duh, you are right. my simplified example: $foo = 'string'; echo isset($foo['bar']); wouldn't trigger the new behavior, it is required to be a chained reference. sorry for the noise. -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#56526) next »