| colder@php.net 2006-08-30, 6:57 pm |
| ID: 38660
Updated by: colder@php.net
Reported By: hahn dot seb at web dot de
Status: Open
Bug Type: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: colder
New Comment:
the change of behavior is explained in
http://php.net/language.oop5.basic:
"When assigning an already created instance of an object to a new
variable, the new variable will access the same instance as the object
that was assigned. This behaviour is the same when passing instances to
a function. A new instance of an already created object can be made by
cloning it."
The optimisations about whether it's internally copied or not are
completely transparent so I'm not sure documenting it is worth the
possible confusion.
Aynway, I'll try to come up with a better version of this paragraph
ASAP.
Previous Comments:
------------------------------------------------------------------------
[2006-08-30 18:20:01] hahn dot seb at web dot de
Description:
------------
On http://www.php.net/manual/en/
language.operators.assignment.php, there is nothing about PHP
and how the "="-operator changed when using objects. Also the
example about that a "value" is copied is not entirely true
anymore and should be updated
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38660&edit=1
|