[UPHPU] unable to assign variable to different object

Wade Preston Shearer wadeshearer.lists at me.com
Mon Sep 3 16:02:28 MDT 2012

I'm stuck and hope someone on the list can help. I have an object. It was assigned in a grandparent class. I want to save a copy of the object so that I can make changes to it and then revert back to the state when I saved it later. Since objects are assigned by reference (oversimplification), to save a copy without my changes affecting the copy, I have to clone it. It works up to this point. The issue I'm having os "reloading" the saved instance of the object. When I try to assign the variable back to the saved version, it saves it as a sub-property instead of replacing. 

Here's some code with comments:


Here is the output:


Here is what I wish the output looked like:


Any ideas?

More information about the UPHPU mailing list