0
我有一个变量$ x的类,我想在其子类的静态函数中使用它。将变量传递给子类中的静态函数
class people{
protected $x;
function __constructor(){
$this->x = 'cool';
}
}
class person extended people {
function static status() {
'Here I want to use the x variable. I tried $this->x,parent::x..';
}
}
谢谢你,有用的信息,现在我知道它是没有意义的保持静态功能。 – Duveral