|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-04 13:31 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2016-08-04 13:31 UTC] cmb@php.net
[2016-08-05 07:53 UTC] pawzar at gmail dot com
[2016-08-05 08:33 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 03:00:02 2026 UTC |
Description: ------------ I am trying to adjst some code to E_STRICT standards but I am getting a "Signature mismatch during inheritance" error, when it seems that there sould be none. What is more bizarre is that this error only occurs when I am trying to implement SomeInterface in the extendig class. Test script: --------------- interface SomeInterface { } abstract class FooClass { } abstract class FooBarClass extends FooClass { } abstract class LightAbstract { public function returnArgument(FooClass $arg) { return $arg; } } // OK class RedLight extends LightAbstract { public function returnArgument(FooBarClass $arg) { return parent::returnArgument($arg); } } // Outputs an error (E_STRICT) class BlueLight extends LightAbstract implements SomeInterface { public function returnArgument(FooBarClass $arg) { return parent::returnArgument($arg); } }