Strange PHP behavior: empty, !, and count
<p>Someone can explain to me if this "freak" behavior its what i should expect.</p>

<p>I'm debbuging some code and got this:</p>

<p>I geting some result on $data and create this if to be sure it's $data have some info.</p>

<p>So:</p>

<pre><code>if(!$data || empty($data) || count($data) == 0)
</code></pre>

<p>And aways geting in the if.</p>

<p>So i do some var_dump to see and wow.</p>

<pre><code>var_dump(!$data , empty($data) , count($data));
</code></pre>

<p>go this:</p>

<pre><code>bool(true)
bool(true)
int(1)
</code></pre>

<p>how count data = 1 and !$data = true and empty($data) = true?</p>

<p>I hope isn't stupid question, i'm sorry if is.</p>
