|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-14 11:59 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2016-06-14 11:59 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Description: ------------ PHP incorrectly complains about static member functions not being compatible. This makes no sense as they're static functions, they don't have a $this pointer, the function being called cannot suddenly be a different function (as can be the case when overriding a non-static member function). Test script: --------------- <?php class A { public static function get($a) {} } class B extends A { public static function get($a, $b) {} } Expected result: ---------------- No warnings should be emitted Actual result: -------------- Warning: Declaration of B::get($a, $b) should be compatible with A::get($a) in php shell code on line 1