As explained in other answers, clone
makes a shallow copy of the object.
If you need to make a deep copy (i.e. recursive copy), you can overload the __clone()
methods.
You can also use this library: MyCLabs\DeepCopy, which is more simple and powerful than a simple clone.