|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-04-13 20:45 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2012-04-13 20:45 UTC] nikic@php.net
[2012-04-14 03:00 UTC] aharvey@php.net
-Status: Closed
+Status: Not a bug
-Assigned To: nikic
+Assigned To:
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 13:00:01 2025 UTC |
Description: ------------ When a method signature is different in an inherited class and its parent, you get a strict notice (assuming they are turned on). This does not happen with constructors. Test script: --------------- <?php error_reporting( -1 ); class A { public function __construct( $a ) { } } class B extends A { public function __construct( array $a ) { } } class C { public function doSomething( $a ) { } } class D extends C { public function doSomething( array $a ) { } } Expected result: ---------------- Strict Notice Declaration of B::__construct() should be compatible with that of A::__construct() in ... Strict Notice Declaration of D::doSomething() should be compatible with that of C::doSomething() in ... Actual result: -------------- Strict Notice Declaration of D::doSomething() should be compatible with that of C::doSomething() in ...