Deconstructor in PHP
<p>After taking a look at some old code:</p>

<pre><code>//Nothing like a destructor!!
function destroy() {
    settype(&amp;$this, 'null');
}
</code></pre>

<p>And called by</p>

<pre><code>$Cache-&gt;destroy();
</code></pre>

<p>However in PHP 5.3 I get
Deprecated: Call-time pass-by-reference has been deprecated in /blah/-cache-.php on line 154</p>

<p>How should I do this?</p>
