After trying several attempts at this for some reason i get the error Access to undeclared static property
when i try to make an object out my class.
(由于某种原因对此进行了几次尝试后,当我尝试在类中创建对象时,出现错误: Access to undeclared static property
。)
My class:
(我的课:)
final class repo {
var $b;
/**
* @var GuzzleHttpClient
*/
protected $client;
function repo($myvar)
{
static::$b = $myvar;
$this->client = $b;
}
}
Me making an object:
(我在做一个对象:)
$myobj = new repo("test");
ask by Jimmy KA translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…