I’m making use of an interface for a set of classes. I have a problem however because I wish for any visibility to be allowed in the interface (That is: public, protected and private). I need the parent method to only be protected and I need the child method to be private, but I get the error saying Fatal error:
Tag: abstract
Abstract constants in PHP – Force a child class to define a constant
I noticed that you can’t have abstract constants in PHP. Is there a way I can force a child class to define a constant (which I need to use in one of the abstract class internal methods) ? Answer A constant is a constant; there is no abstract or private constants in PHP as far as I know, but you