title: Deleting an object and creating a new one instead
body: <p>I have a pointer to an object, which I want to release, and then create a new one.
  What I tried:</p>
  
  <pre><code>$this-&gt;myObject = null;
  $this-&gt;myObject = new myObject($newVar);
  </code></pre>
  
  <p>Should this work? Am I doing it wrong?
  I tried calling <code>__destructor()</code> manually but that triggered an "unknown function" error.</p>