According to previous comment, if you have another object as a member variable, do following:
class MyClass {
private $someObject;
public function __construct() {
$this->someObject = new SomeClass();
}
public function __clone() {
$this->someObject = clone $this->someObject;
}
}
Now you can do cloning:
$bar = new MyClass();
$foo = clone $bar;