Object cloning in PHP

An object copy is created by using the clone keyword, which calls the object's __clone() method. An object's __clone() method cannot be called directly.


https://www.geekboots.com/php/object-cloning


Click here for object cloning example

Comments