title: PHP Shorthand Ternary not behaving as expected
body: <p>Introduced in PHP 5.3, the shorthand ternary operator should work like this:</p>
  
  <pre><code>$result = 'foo' ?: 'bar';
  </code></pre>
  
  <p>should return <code>foo</code>. However, on my live server (PHP 5.4.26), the result is <code>bar</code>.</p>
  
  <p>A full ternary operator syntax works fine.</p>
  
  <pre><code>$test = 'foo';
  $result = $test ? $test : 'bar';
  </code></pre>
  
  <p>returns <code>foo</code> correctly. Both syntaxes are fine on my dev server (PHP 5.3.10).</p>
  
  <p>Is there any way this could be disabled somehow? Any suggestions?</p>
  
  <p>Changing all the instances to the full systax is undesirable - there's a significant number in an external library (Amazon AWS SDK).</p>
  
  <p><strong>Correction:</strong></p>
  
  <pre><code>$result = 'foo' ?: 'bar';
  </code></pre>
  
  <p>DOES have the correct result on both servers, but</p>
  
  <pre><code>$test = 'foo';
  $result = $test ?: 'bar';
  </code></pre>
  
  <p>Incorrectly returns <code>bar</code> on the live server. Which is even wierder...</p>