#6417 [Ana->Csd]: Incorrect behaviour with references and arrays

From: Date: Thu, 22 Aug 2002 15:18:26 +0000
Subject: #6417 [Ana->Csd]: Incorrect behaviour with references and arrays
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17552@lists.php.net to get a copy of this message
ID: 6417 Updated by: iliaa@php.net Reported By: jon@imagenet.co.uk -Status: Analyzed +Status: Closed Bug Type: Scripting Engine problem Operating System: Linux RedHat 6.2 PHP Version: 4.0.6-dev New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-06-24 23:43:45] pkeshish@idontlike.spam.yahoo.com Confirmed on PHP Version 4.2.1 ------------------------------------------------------------------------ [2002-02-11 03:18:56] nassar@wpi.edu See bug number 11909 for a similar issue related to objects ------------------------------------------------------------------------ [2001-12-12 08:12:39] yohgaki@php.net I think PHP version (and OS) is better to be updated. It's hard to know which version is the last PHP version tested. ------------------------------------------------------------------------ [2001-11-22 18:24:27] venaas@php.net I would like to see this fixed, it's a serious bug IMO. Hope this serves as a reminder to someone (: ------------------------------------------------------------------------ [2001-05-23 18:49:42] jeroen@php.net Resurfacing. Is there any work being done on this? Or should I put this in the docs? If you don't expect it, this bug can create very strange behaviour, for example when you have some library function that creates references, it can mix up your script. This is definitely a bug, and should be fixed a.s.a.p. The fix is included here! status -> analyzed (imo it is even critical, this is straight against the principle of assigning by value: [documentation] >In PHP, variables are always assigned by value. That is to >say, when you assign an expression to a variable, the >entire value of the original expression is copied into the >destination variable. This means, for instance, that after >assigning one variable's value to another, changing one of >those variables will have no effect on the other. ) ------------------------------------------------------------------------ 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/6417 -- Edit this bug report at http://bugs.php.net/?id=6417&edit=1

« previous php.bugs (#17552) next »