php clone
snippet in php

php clone

user2885

//Copies an existing object
$objectA = clone $objectB;

php clone object

user4130

$objectB = clone $objectA;