Why is this not valid PHP?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2188629/php-how-to-chain-method-on-a-newly-created-object">PHP: How to chain method on a newly created object?</a>  </p>
</blockquote>



<p>I started off with this code:</p>

<pre><code>$page = new Page();

$page-&gt;replace_tags(...);

$page-&gt;output();
</code></pre>

<p>I changed the signature of <code>replace_tags</code> to allow method chaining, by returning <code>$this</code>. Why can I still not write it like this?</p>

<pre><code>new Page()-&gt;replace_tags(...)-&gt;output();
</code></pre>

<p>Or this:</p>

<pre><code>(new Page())-&gt;replace_tags(...)-&gt;output();
</code></pre>
