[PHP-BUG] Bug #67777 [NEW]: Overriding and derived classes

[email protected] ("[email protected]")
Newsgroups php.standards
Message-ID <[email protected]>
From:             joelm
Operating system: 
PHP version:      Irrelevant
Package:          PHP Language Specification
Bug Type:         Bug
Bug description:Overriding and derived classes

Description:
------------
https://github.com/php/php-langspec/blob/master/spec/14-classes.md#general

"Methods and properties from a base class can be overridden in a derived
class by redeclaring them with the same signature defined in the base
class." This is not accurate. When a derived class overrides a method,
if there is no abstract decl (either abstract decl in an abstract parent
or a decl in an implemented interface) in the inheritance hierarchy then
whatever signature you want can be used for the derived method. If there
is an abstract decl in the inheritance hierarchy, then the derived
method's signature must match the signature of the abstract decl. 


-- 
Edit bug report at https://bugs.php.net/bug.php?id=67777&edit=1
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.