initializing class field with an object
<p>I'm new to php so the question is dump. Take a look at the following code</p>

<pre><code>class A {
    private $obj;

    public function A() {
        $this-&gt;obj = new Obj();
        //$this-&gt;obj-&gt;fff() works here;
        //still var_dump($this-&gt;obj) prints NULL here
    }

    public f() {
        //$this-&gt;obj is NULL here!!!
        //$this-&gt;obj-&gt;ff() throws an error
    }
}
</code></pre>

<p><strong>UPD</strong> in <code>f()</code> I get <code>Fatal error: Call to a member function ff() on a non-object in ...</code></p>

<p>how should I init <code>$obj</code> to see it in <code>f()</code>?</p>

<p>Thank you in advance!!</p>
