Am 12.11.2017 um 10:50 schrieb Alice Wonder:
On 11/12/2017 01:38 AM, Tony Marston wrote:
Just because some languages use a corrupt definition of "constant" is no
reason for PHP to do the same. A constant has a value which, once
defined, cannot be changed. It is not logical to define a constant name
in one place and its value in another.
Plus plus on this. A constant does not change. If it changes it is a
variable. I do not know anything about Dart but if they are changing the
meaning of well-defined terms like constant, I worry that there will be
programs with security holes simply because some developers will not
understand what they mean by the terms they define.
what about both of you read the initial post of that thread as well as
the manual at http://php.net/manual/en/language.oop5.interfaces.php
_______________________-
that's the topic and not arbitary change constants!
A constant defined in an interface cannot be overwritten in the class
that implements the interface, however, further subclasses can overwrite
the content of the constant at will
- https://3v4l.org/DFB37
- https://3v4l.org/9LMci
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php