public function __clone() { parent::__clone(); foreach ($this->_children as $i => $child) { $this->appendChild(clone $child); } }