Saving Yourself Time with the Clone Construct
|Top Tutorials||New Tutorials||Submit||Login||Register|
Total Hits: 12328
Total Votes: 139 votes
Category: PHP/Object Oriented
Submitted on: 2008-03-16 07:48:08
Submitted By: Devesh Khanna
Description:Cloning an object is quite different than it was in PHP4. In PHP4 you simply assigned the object to a new object and it would clone it verbatim. With the release of PHP5, things got a little more complex but a lot more flexible. PHP5 offers the clone construct along with a magic method to control the cloning process. More detail...