Bug #72755 [NEW]: Signature mismatch during inheritance

From: Date: Thu, 04 Aug 2016 13:11:16 +0000
Subject: Bug #72755 [NEW]: Signature mismatch during inheritance
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202927@lists.php.net to get a copy of this message
From: pawzar at gmail dot com Operating system: Linux 4.4.0-31-generic PHP version: 5.6.24 Package: Scripting Engine problem Bug Type: Bug Bug description:Signature mismatch during inheritance 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); } } -- Edit bug report at https://bugs.php.net/bug.php?id=72755&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72755&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72755&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72755&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72755&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72755&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72755&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72755&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72755&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72755&r=support Expected behavior: https://bugs.php.net/fix.php?id=72755&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72755&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72755&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72755&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72755&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72755&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72755&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72755&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72755&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72755&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72755&r=mysqlcfg

« previous php.bugs (#202927) next »