Re: [PHP4BETA] <?$a="1";$a[0]=1;?> cause mem-block overrun.

From: Date: Sat, 13 Nov 1999 22:25:56 +0000
Subject: Re: [PHP4BETA] <?$a="1";$a[0]=1;?> cause mem-block overrun.
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-6204@lists.php.net to get a copy of this message
Thies C. Arntzen writes: > i know - i've reported this one a few times - but i haven't gotten any > reply on it yet... > > andi, zeev - this is something that only you can fix i persume? > > ..verified with latest CVS > > tc BTW, what is the core statement on what this should do? There's an open doc bug report that I'd like to close on this; I'd just like to make sure that I document the expected behaviour correctly: <?php $a = 1; echo "$a, "; $a[0] = 'Hello'; echo "'$a[0]'"; ?> In PHP 3.0.13-dev, I get: 1 Warning: Variable $a is not an array or string in /home/torben/public_html/php3test/__phplist.html on line 16 '1' In PHP 4.0B3-RC4, I get: 1, '' Now, it has been argued that treating $a as an array should automatically convert it to an array (i.e., the above should print "1, 'Hello'" (after which, presumably, echo $a would output the normal 'Array'). Could someone finalize the expected behaviour for me so it can go in the manual? Thanks, Torben

« previous php.version4 (#6204) next »