What is this code / What does it do?
<p>So I was browsing through some PHP references and this came up:</p>

<pre><code>&lt;?php
$x = "hello world";
echo $x = ($x) ? true : false;
?&gt;
</code></pre>

<p>I have never actually come across this before :S
I ran this on my local machine and it returned true. </p>

<p>How / Why does this code output 1, and what exactly is this?</p>

<p>My guess is that it checks if $x is set, and if it is, it returns whatever is on the left of the colon. </p>
