note 102932 added to language.references
| From: | bjb6371atritdotedu at osu1 dot php dot net | Date: | Tue, 15 Mar 2011 14:48:58 +0000 |
| Subject: | note 102932 added to language.references | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177899@lists.php.net to get a copy of this message | ||
I've personally found the clone operation to be less than desirable in creating duplicate
objects. I've therefore resided to the solution of using a Copyable interface which requires a
single method, copy, to be implemented. Copy would then perform the assignment to a new instance of
the object from the $this reference. This prevents referencing issues between cloned copies of the
same object.
If anyone has a more robust solution to a string reference acting "static" across cloned
objects please let me know. I've given up at this point.
----
Server IP: 69.147.83.197
Probable Submitter: 129.21.80.126
----
Manual Page -- http://www.php.net/manual/en/language.references.php
Edit -- https://master.php.net/note/edit/102932
Del: integrated -- https://master.php.net/note/delete/102932/integrated
Del: useless -- https://master.php.net/note/delete/102932/useless
Del: bad code -- https://master.php.net/note/delete/102932/bad+code
Del: spam -- https://master.php.net/note/delete/102932/spam
Del: non-english -- https://master.php.net/note/delete/102932/non-english
Del: in docs -- https://master.php.net/note/delete/102932/in+docs
Del: other reasons-- https://master.php.net/note/delete/102932
Reject -- https://master.php.net/note/reject/102932
Search -- https://master.php.net/manage/user-notes.php