I m new to php so the question isump. 审视以下法典
class A {
private $obj;
public function A() {
$this->obj = new Obj();
//$this->obj->fff() works here;
//still var_dump($this->obj) prints NULL here
}
public f() {
//$this->obj is NULL here!!!
//$this->obj->ff() throws an error
}
}
UPD in f()
I get Fatal error: Call to a member function ff() on a non-object in ...
如何在<条码>上填写。
advance!