以下代码的执行结果为( )&...
发布于 2022-03-03 11:42:02
以下代码的执行结果为( )
class a
{
protected $c
public function a()
{
$this->c = 10
}
}
class b extends a
{
public function print_data()
{
return $this->c
}
}
$b = new b()
echo $b->print_data()
class a
{
protected $c
public function a()
{
$this->c = 10
}
}
class b extends a
{
public function print_data()
{
return $this->c
}
}
$b = new b()
echo $b->print_data()
登录后免费查看答案
关注者
0
被浏览
44