//dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
//$myclone = clone $object; // PHP clone is a shallow copy only, not a real clone, so properties of references will keep references (refer to the same target/variable
$myclone=unserialize(serialize($object));
if(empty($native))
{
$myclone=unserialize(serialize($object));
}
else
{
$myclone=clone$object;// PHP clone is a shallow copy only, not a real clone, so properties of references will keep references (refer to the same target/variable)