PHP 4.0 Bug #8427: Unwanted references

From: Date: Tue, 26 Dec 2000 18:31:46 +0000
Subject: PHP 4.0 Bug #8427: Unwanted references
Groups: php.dev 
Request: Send a blank email to php-dev+get-42280@lists.php.net to get a copy of this message
From: pkalliok@cs.helsinki.fi Operating system: Any PHP version: 4.0.4 PHP Bug Type: Feature/Change Request Bug description: Unwanted references There are at least three places I know of where normal values are silently turned into references: - when setting a variable by reference from a part of array or object, the value being set _from_ is also turned into reference - object contained in other objects are turned into references by settype() and calling their methods - NULLs become references to NULLs when you set an object from them by reference Because this all alters the behaviour of PHP in subtle, dangerous ways, makes debugging harder and because references have still bugs (for example, serialisation), I ask you not to turn things into references when I don't see there is any reason to. I understand it is your policy that "turning a value into a reference should be safe", but as long as references have problems, don't adopt this policy. -- Edit Bug report at: http://bugs.php.net/?id=8427&edit=1

« previous php.dev (#42280) next »