On Fri, Nov 25, 2011 at 3:52 AM, Daniel Convissor < dani...@analysisandsolutions.com> wrote:
> Hi Rasmus: > > > Yes, no change in any of that. In your usage, the case that behaves > > differently in 5.4 was actually a fatal error in 5.3, so chances are > > pretty good you don't have too many of these. > > Things only go fatal in 5.3 under some circumstances. Doing isset() > does not: > > I also noted this previously, isset() isn't immune to the fatal error (in 5.3) just it needs an additional level of chaining to trigger it. so echo $string['foo']['bar'] does fatal, echo isset($string['foo']['bar']) doesn't, but echo isset($string['foo']['bar']['baz']) does again. I think the reason is that isset in this case will try to get the next-to-last element, to check that it contains the last, but referencing the next-to-last will mean an offset chaining which will generate the fatal. This is somehow different than with arrays where isset will always return false for any non-existent index. That is one thing that this change will fix in 5.4: isset($string[0][0][0][0]) will be always false if $string is an empty string. (But one has to keep in mind that this change(allowing chaining) also means that $string[0][0][0] will always point to the first character of $string.) -- Ferenc Kovács @Tyr43l - http://tyrael.hu