PHP4 to PHP5 Upgrade - set class properties
<p>I need to get our server running on php5 but we have an old CMS that has issues I need to bandaid till we have the time to have a new CMS setup and the old data (about 4000 pages with great SEO) moved. </p>

<p>The guts of the old CMS would load/save the page data as class variables/properties that were then serialised and saved to a file, and unserialised to be used, all by methods in the class. </p>

<pre><code>$this = $ToolBox-&gt;fileUnSerialize($myFile);
</code></pre>

<p>You can't do that in php5 as you can not reassign the $this variable. </p>

<p>I could do this:</p>

<pre><code>$vardata = $ToolBox-&gt;fileUnSerialize($myFile);
$this-&gt;var1 = $vardata-&gt;var1;
$this-&gt;var2 = $vardata-&gt;var2;
</code></pre>

<p>but there are over 50 variables. Is there a better way?</p>
