Php Magic Methods and Empty
<p>Having the following code</p>

<pre><code>class test {
    private $name;
    public function __get($name){
        return $name;
    }
    public function __set($name,$value){
        $this-&gt;name = $value;
    }
}
$obj = new test();
$obj-&gt;a = 2;

if (!empty($obj-&gt;a)) {
    echo 'not empty';
}
</code></pre>

<p>This is calling __isset. But this is not being defined so it always return empty. What is the best way to check for a non empty property?</p>

<p>Update :changing the class is not a solution because it's a 3th party component and it has to remain intact.</p>
