+ 2
Object cloning is creating a copy of an object. An object copy is created by using the clone keyword and the __clone() method cannot be called directly. In PHP, cloning an object is doing a shallow copy and not a deep copy. Meaning, the contained objects of the copied objects are not copied. If you wish for a deep copy, then you need to define the __clone() method. https://phppot.com/php/cloning-in-php-object-model/
4th Aug 2019, 4:41 AM
᠌Bidex
᠌Bidex - avatar