Re: copy() method on objects

From: Date: Mon, 26 Apr 2010 04:47:18 +0000
Subject: Re: copy() method on objects
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-304586@lists.php.net to get a copy of this message
Paul M Foster wrote:
[snip]
There are cases where I strictly want a *copy* of $a stored in $b. In cases like this, I supply $a's class with a copy() method, and call it like this: $b = $a->copy(); Is this reasonable, or do people have a better/more correct way to do this? Paul http://fr.php.net/clone
hth rich

« previous php.general (#304586) next »