Shorthand ternary operator syntax (PHP)
<p>Just been learning about the shorthand ternary operator and was expecting the following to work:</p>

<pre><code>$dbh =new PDO('mysql:blad','user','pass');
(!$dbh) ? throw new Exception('Error connecting to database'); : return $dbh; 
</code></pre>

<p>Instead i get the following error:</p>

<pre><code>parse error: syntax error, unexpected T_THROW in...
</code></pre>

<p>Any ideas for the correct syntax?</p>

<p>Thank you</p>
