Undefined member variable : <p>I've created following class:</p>

<pre><code>class NotFoundException extends Exception {}
class Foo{
    private $path;
    private $array;

    public static function load($name) {
        try {
            return new Foo($name);
        } catch (NotFoundException $unfe) {
            return null;
        }
    }

    public function __construct($name){
        if (true){
            $this-&gt;$path = 'public_html/'.$name.'/';
            $this-&gt;$array= array('1','2','3');
        }
        else
            throw new NotFoundException();
    }

    public function getArray(){
        return $this-&gt;$array;
    }
}
$foo = Foo::load('first');
print_r($foo-&gt;getArray());
</code></pre>

<p>When I run my code, I get<br>
<strong>NOTICE</strong> Undefined variable: <em>path on line number 18</em><br>
<strong>FATAL ERROR</strong> Uncaught Error: <em>Cannot access empty property</em>  </p>

<p>I have no idea what is causing the problem.</p>
