【发布时间】:2016-06-02 04:55:10
【问题描述】:
是否可以修改作为数组的父 public var,以便在子类中包含更多项目?
现在我只是在物理上重复父数组,然后向其中添加一些项目:
class A {
public $arr = ['hello'];
}
class B extends A {
public $arr = ['hello','world']; //wanna get rid of 'hello' and use parent
}
【问题讨论】: