php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #38660 The "Assignment Operators"-Manual needs updating
Submitted: 2006-08-30 18:20 UTC Modified: 2006-09-06 11:59 UTC
From: hahn dot seb at web dot de Assigned: colder (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2006-08-30 18:20 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-30 19:26 UTC] colder@php.net
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.
 [2006-08-30 19:30 UTC] colder@php.net
-open+assigned
 [2006-09-06 11:59 UTC] colder@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of colder
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=18f34143e12825ec03cb3b99419201de9b9452bc
Log: Fix #38660 (Implement changes regarding objects in PHP5)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 20:01:34 2025 UTC