php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51787 cloning objects
Submitted: 2010-05-10 20:35 UTC Modified: 2010-05-12 08:17 UTC
From: ele_hache at hotmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.2 OS: WINDOWS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ele_hache at hotmail dot com
New email:
PHP Version: OS:

 

 [2010-05-10 20:35 UTC] ele_hache at hotmail dot com
Description:
------------
If I have an object that has references to different other objects and even a few 
collections [arrays] of some even other objects; and I want to make a copy of that 
instance ?? Must I clone the entire instance structure and performing a clone on 
every other referenced object and the collections ?? If yes ... What a shit !!!

The _clone call should be aware of the other referenced objects inside an object, 
and do the clone as well. After all, why am I doing a clone, don't you think ??


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-12 08:17 UTC] mike@php.net
-Status: Open +Status: Bogus
 [2010-05-12 08:17 UTC] mike@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 22 21:00:03 2025 UTC