当我开发我的网络时,我遇到了一个疯狂的问题,我无法找到解决方案。
if ( $this->client == null ) {
$this->client = Client::getInstance();
}
我用我的项目运行x-debug,并获得疯狂的结果
$this->client == null
返回true
但是
块($this->client = Client::getInstance();
)中的代码不被称为
if ( $this->client == null ) { //return true
$this->client = Client::getInstance(); //not called
}
var_dump($this->client); // $this->client == null return false
如果有人可以解决这个疯狂问题的解决方案或原因,请帮助我