What is the difference between this 2 'IF'?
<p>Given this:</p>

<pre><code>$ids = '';
</code></pre>

<p>I just realized that this:</p>

<pre><code>$single = $ids == FALSE || is_array($ids)? FALSE : TRUE;
var_dump($single);
</code></pre>

<p>and this:</p>

<pre><code>if ($ids == FALSE) 
{
    $single = TRUE;     
}
else 
{
    if (is_array($ids)) 
    {
        $single = FALSE;
    } 
    else 
    {
        $single = TRUE;
    }
}
var_dump($single);
</code></pre>

<p>Display different results (false and true respectively). However, This only happens when the variable is:</p>

<pre><code>$ids = '';
</code></pre>

<p>or</p>

<pre><code>$ids;
</code></pre>

<p>If $ids is an array, an integer, or a string it works fine.
<strong>Does anybody know why?</strong> Thanks in advance!</p>

<p>By the way, I have just realized that if you type $ids === FALSE in the first conditional stament (the single line one) it will work fine. But I still don't understand the 'logic' behind this.</p>
