In PHP 5.2 why is instantiating a class and calling a method on the same line invalid?
<p>This is what I'd like to do:</p>

<pre><code>$app = (new Factory())-&gt;GetApp();
</code></pre>

<p>However, I get an "unexpected T_OBJECT_OPERATOR" error.</p>

<p>To avoid this, I have to do:</p>

<pre><code>$Factory = new Factory();
$app = $Factory-&gt;GetApp();
</code></pre>

<p>Why is this necessary?  I'm running PHP 5.2 if it makes any difference.</p>
