|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-01-09 19:16 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2017-01-09 19:16 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 21:00:01 2026 UTC |
Description: ------------ <?php class A { } class B { public function m(A $a = NULL, &$n) { echo "B.m";} }; class C extends B { public function m( $a ) { echo "C.m";} }; $b = new B(); $b->m(new A(), $b); $c = new C(); $c->m(new A(), $b); ?> reports: PHP Warning: Declaration of C::m($a) should be compatible with B::m(A $a, &$n) on line 4 but shall report: PHP Warning: Declaration of C::m($a) should be compatible with B::m(A $a = NULL, &$n) on line 4 The same happens with php 5.6.17 . Just removing &$n leads to the correct "PHP Warning: Declaration of C::m($a) should be compatible with B::m(A $a = NULL) on line 4"