From: d_quijote at web dot de Operating system: Linux PHP version: 5.3.0alpha3 PHP Bug Type: Scripting Engine problem Bug description: Strict-Warning when overwriting methods with changed parameters
Description: ------------ A Strict-Warning is raised when the parameters of the subclass differ from the parameters of the overwritten superclass method. This error seems only to occure if any interface is included in the superclass Reproduce code: --------------- class A implements Iterator { public function current() {} public function key() {} public function next() {} public function rewind() {} public function valid() {} public function f($x) { echo $x.PHP_EOL; } } class B extends A { public function f($x,$y) { echo __METHOD__.'('.$x.', '.$y.')'.PHP_EOL; } } $b = new B(); $b->f(1,2); Expected result: ---------------- B::f(1, 2) Actual result: -------------- Strict Standards: Declaration of B::f() should be compatible with that of A::f() in /index.php on line 19 -- Edit bug report at http://bugs.php.net/?id=46984&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46984&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46984&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46984&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46984&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46984&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46984&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46984&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46984&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46984&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46984&r=support Expected behavior: http://bugs.php.net/fix.php?id=46984&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46984&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46984&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46984&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46984&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46984&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46984&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46984&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46984&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46984&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46984&r=mysqlcfg