It is necessary to declare a property of the base class so that it is not inherited by descendants (derived from it)?
PS As final for methods .
UPD
private will not work - the array should be accessible, the sense is in saving, maybe on "kopecks", but still ... The base class has an array of data, and subclasses are often used and carry unnecessary weight.
The only thing that comes to mind is to redefine the property in each subclass to empty, but I would like to be nice. ))
UPD2
So far I have done this:
//базовый класс class BClass{ public $cur_array = array('данные'); ... } //решение проблемы class CLEAR extends BClass{ public $cur_array = array(); } //теперь подклассы наследую уже от CLEAR class SUBClass extends CLEAR{ .... }