ID:               38974
 User updated by:  hendlerman at yahoo dot com
 Reported By:      hendlerman at yahoo dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         Arrays related
 Operating System: windows XP
 PHP Version:      5.1.6
 New Comment:

the code you've outlined is not the same as the code I have.

what happens to the key in the array called "count"?


Previous Comments:
------------------------------------------------------------------------

[2006-09-27 15:34:44] [EMAIL PROTECTED]

# php -r '$s = "string"; $s[0] = 3; var_dump($s);'
string(6) "3tring"

This is expected behaviour.


------------------------------------------------------------------------

[2006-09-27 15:34:04] hendlerman at yahoo dot com

edit title

------------------------------------------------------------------------

[2006-09-27 15:32:43] hendlerman at yahoo dot com

Changing title and re-opening so it gets reviewed again.

------------------------------------------------------------------------

[2006-09-27 15:14:18] hendlerman at yahoo dot com

I understand that it's valid in PHP to overwrite the string with an
array. The problem is that the string is not actually overwritten by
the array. I thought that was clear from the sample code!

Doesn't seem like a feature if the array isn't overwritten. Perhaps I
should have titled = "String is not properly overwritten "

------------------------------------------------------------------------

[2006-09-27 14:54:23] [EMAIL PROTECTED]

$string[0] = 'c'; is perfectly valid code and that's what you get with
$string['otherstring'].

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38974

-- 
Edit this bug report at http://bugs.php.net/?id=38974&edit=1

Reply via email to