By etoolbox
via electrictoolbox.com
Submitted: Nov 09 2009 / 12:49
Objects in PHP are assigned by reference, so copying an object with the = operator will result in a second variable referencing the same object and not an actual copy. Enter PHP's clone function which creates a shallow copy of the object.
Add your comment