Re: Constants and Access Modifiers

From: Date: Sun, 05 Nov 2017 12:03:57 +0000
Subject: Re: Constants and Access Modifiers
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-101062@lists.php.net to get a copy of this message
> > Hi! > > > My wording was maybe a bit wrong here, and I was biased by the fact that > > I would like to see abstract constants. The fact that not everything can > > What is "abstract constant"? If you need something that can change, just > use a method. Constant is meant to be a nice way to write something > inherently constant, such as instead of "/very long > (and+)cubmber|some?*regexp/" you'd write NICE_REGEXP_CONSTANT. But it's > not supposed to create parallel inheritance structure or something. If > it needs to be non-constant, just use a method. > Totally agree with that. We should deprecate constant inheritance instead. Regards, Niklas

« previous php.internals (#101062) next »