|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-20 04:10 UTC] requinix@php.net
-Status: Open
+Status: Wont fix
[2013-09-20 04:10 UTC] requinix@php.net
[2013-09-20 04:30 UTC] metamarkers at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
Description: ------------ It would be nice if an object could determine whether or not it should be included in a clone, by returning a value that should be used in its stead, or an updated clone of itself, or anything of the like. Test script: --------------- class Foo { } class Bar { public function __inClone ( $clone ) { return $clone instanceof Foo ? null : $this; } } $foo = new Foo(); $foo->bar = new Bar(); $foo2 = clone $foo; isset($foo2->bar); // false