Why does this work: if ( isset($var) && $var ){
<p>Lets say I have a variable $var that has not been defined. Why don't I get errors with this statement:</p>

<pre><code>if ( isset($var) &amp;&amp; $var ){
    // something
} else {
    // do something else
}
</code></pre>

<p>How can you check whether something is true or not "&amp;&amp; $var" if it is not set yet? Does isset() do something to the if statement. Surely this should return:</p>

<pre><code>Notice: Undefined variable:$var
</code></pre>
