The following code (#1):
var_dump($myObject->getBook()->getCollection());
$testArray=Array();
var_dump($testArray);
var_dump(empty($testArray));
...will output:
array(0) { } array(0) { } bool(true)
The following code (#2):
var_dump($myObject->getBook()->getCollection());
$testArray=Array();
var_dump($testArray);
var_dump(empty($myObject->getBook()->getCollection()));
...will output:
Nothing. No error, not a single character. No nothing.
class Book{
protected $bidArray=Array();
public function getCollection(){
return $this->bidArray;
}
}
What is happening there?