Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Andi Gutmans
At 04:00 PM 4/27/2004 +0200, Marcus Boerger wrote: Hello Andi, Tuesday, April 27, 2004, 3:15:47 PM, you wrote: > For BC purposes with PHP 3, NULL/False and unset creation of array does not > emit a warning. I don't think we should change this. It is time to forget BC with PHP 3. Nearly noone is u

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Edin Kadribasic
On Tuesday 27 April 2004 15:15, Andi Gutmans wrote: > For BC purposes with PHP 3, NULL/False and unset creation of array does not > emit a warning. I don't think we should change this. > I do understand the argument against breaking BC with the $a = 'foo'; > $a['bar']['qux'] = 42; code. I think it'

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Christian Schneider
Marcus Boerger wrote: For BC purposes with PHP 3, NULL/False and unset creation of array does not emit a warning. I don't think we should change this. It is time to forget BC with PHP 3. Nearly noone is using it now. PHP 4 doesn't issue a warning/notice either and I could imagine there is plenty o

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Marcus Boerger
Hello Andi, Tuesday, April 27, 2004, 3:15:47 PM, you wrote: > For BC purposes with PHP 3, NULL/False and unset creation of array does not > emit a warning. I don't think we should change this. It is time to forget BC with PHP 3. Nearly noone is using it now. marcus -- PHP Internals - PHP Runt

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Andi Gutmans
For BC purposes with PHP 3, NULL/False and unset creation of array does not emit a warning. I don't think we should change this. I do understand the argument against breaking BC with the $a = 'foo'; $a['bar']['qux'] = 42; code. I think it's probably best if I revert back to PHP 4 behavior and em

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread messju mohr
On Tue, Apr 27, 2004 at 02:16:43PM +0200, Marcus Boerger wrote: > Hello Christian, > > Tuesday, April 27, 2004, 1:34:47 PM, you wrote: > > > Marcus Boerger wrote: > >>>[ $a = 'foo'; $a['bar'] = 42; has an even weirder behaviour: It results > >>>in the string '4oo'... ] > >> > >> That's a pretty

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Marcus Boerger
Hello Christian, Tuesday, April 27, 2004, 1:34:47 PM, you wrote: > Marcus Boerger wrote: >>>[ $a = 'foo'; $a['bar'] = 42; has an even weirder behaviour: It results >>>in the string '4oo'... ] >> >> That's a pretty. It is using 'bar' as a sting index to 'foo' and to do >> this it needs to conver

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Christian Schneider
Marcus Boerger wrote: [ $a = 'foo'; $a['bar'] = 42; has an even weirder behaviour: It results in the string '4oo'... ] That's a pretty. It is using 'bar' as a sting index to 'foo' and to do this it needs to convert 'bar' to an integer. The rest is obvious. So you find it obvious that 42 is cast to

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Marcus Boerger
Hello Christian, thanks for the test Tuesday, April 27, 2004, 12:20:36 PM, you wrote: > Andi Gutmans wrote: >> I made this change back in December. >> I guess I could revert back but I think it makes sense to be strict here. > Reevaluating it I noted the following: > $a = 'foo'; $a['bar']['qux'

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Christian Schneider
Andi Gutmans wrote: I made this change back in December. I guess I could revert back but I think it makes sense to be strict here. Reevaluating it I noted the following: $a = 'foo'; $a['bar']['qux'] = 42; # error $a = 42; $a['bar']['qux'] = 42;# warning $a = true; $a['bar']['qux'] =

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Marcus Boerger
Hello Andi, be strict marcus Tuesday, April 27, 2004, 9:51:35 AM, you wrote: > I made this change back in December. > I guess I could revert back but I think it makes sense to be strict here. > What does the rest think? > Andi > At 03:49 AM 4/27/2004 +, Curt Zirzow wrote: >>I can't seem

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Christian Schneider
Andi Gutmans wrote: At 03:49 AM 4/27/2004 +, Curt Zirzow wrote: $a = 'a string'; /* E_ERROR Cannot use string offset as an array */ echo is_array($a['bar']['baz']); > I made this change back in December. I guess I could revert back but I think it makes sense to be strict here. What does the res

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Magnus Määttä
On Tuesday 27 April 2004 09.51, Andi Gutmans wrote: > I made this change back in December. > I guess I could revert back but I think it makes sense to be strict here. > What does the rest think? Be strict /Magnus -- Confession is good for the soul only in the sense that a tweed coat is good for

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Derick Rethans
On Tue, 27 Apr 2004, Andi Gutmans wrote: > I made this change back in December. > I guess I could revert back but I think it makes sense to be strict here. > What does the rest think? Be strict. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.ph

Re: [PHP-DEV] Illegal use of string offset

2004-04-27 Thread Andi Gutmans
I made this change back in December. I guess I could revert back but I think it makes sense to be strict here. What does the rest think? Andi At 03:49 AM 4/27/2004 +, Curt Zirzow wrote: I can't seem to find any discussion on this BC issue, so forgive me if this has already been discussed. Giv

Re: [PHP-DEV] Illegal use of string offset

2004-04-26 Thread Derick Rethans
On Tue, 27 Apr 2004, Curt Zirzow wrote: > > I can't seem to find any discussion on this BC issue, so forgive me if > this has already been discussed. > > Given the following; > > $a = 'a string'; > > /* E_ERROR Cannot use string offset as an array */ > echo is_array($a['bar']['baz']); > > /* non e