PHP empty() strange behaviour
<p>The following code (#1):</p>

<pre><code>var_dump($myObject-&gt;getBook()-&gt;getCollection());
$testArray=Array();
var_dump($testArray);
var_dump(empty($testArray));
</code></pre>

<p>...will output:</p>

<pre><code>array(0) { } array(0) { } bool(true)
</code></pre>

<p>The following code (#2):</p>

<pre><code>var_dump($myObject-&gt;getBook()-&gt;getCollection());
$testArray=Array();
var_dump($testArray);
var_dump(empty($myObject-&gt;getBook()-&gt;getCollection()));
</code></pre>

<p>...will output:</p>

<p>Nothing. No error, not a single character. No nothing.</p>

<pre><code>class Book{
  protected $bidArray=Array();
  public function getCollection(){
    return $this-&gt;bidArray;
  }
}
</code></pre>

<p>What is happening there?</p>
