I have an object $objDummy of some class ClassDummy and another is as
$objDummy
ClassDummy
$objClone = clone $objDummy;
Then I make any ch
You can do this, but not for objects with methods ->
function cloneObj(&obj) { return json_decode(json_encode($obj)); } $a = new stdClass(); $b = cloneObj($a);