PHP 4.0 Bug #5640 Updated: When a common name for an array and scalar is used, assignments override each o

From: Date: Mon, 17 Jul 2000 13:49:31 +0000
Subject: PHP 4.0 Bug #5640 Updated: When a common name for an array and scalar is used, assignments override each o
Groups: php.dev 
Request: Send a blank email to php-dev+get-24752@lists.php.net to get a copy of this message
ID: 5640 Updated by: rasmus Reported By: alex@zend.com Status: Closed Bug Type: Misbehaving function Assigned To: Comments: This is more of a design decision than a bug. There are plans to address it in the future though. When you do $a="world" then $a[0] is the first character of $a or 'w'. Setting the first character of a string to "hello" makes no sense, so PHP just sets it to "h" and the output should be "horld" and "h". In the other case I would expect the output to be "world" and "w" since setting $a will overwrite $a[0]. Full Bug description available at: http://bugs.php.net/?id=5640

« previous php.dev (#24752) next »