|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-02-23 17:15 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2018-02-23 17:15 UTC] cmb@php.net
[2018-02-23 17:22 UTC] cmb@php.net
-Status: Closed
+Status: Duplicate
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 18:00:01 2025 UTC |
Description: ------------ Good evening. I think the following code should be allowed. Test script: --------------- <?php class ParentClass { } class ChildClass extends ParentClass { } class A { public function test() : ParentClass{} } class B extends A { public function test() : ChildClass{} } Expected result: ---------------- No error. Actual result: -------------- Fatal error: Declaration of B::test(): ChildClass must be compatible with A::test(): ParentClass