#27623 [NEW]: implementation of interfaces not correct handled

From: Date: Wed, 17 Mar 2004 10:46:43 +0000
Subject: #27623 [NEW]: implementation of interfaces not correct handled
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56577@lists.php.net to get a copy of this message
From: fd@php.net Operating system: debian linux PHP version: 5CVS-2004-03-17 (dev) PHP Bug Type: Class/Object related Bug description: implementation of interfaces not correct handled Description: ------------ A implementation of a class whith a method which is not declared as in the interface should throw an error, which it does in php5b4 but not in the current HEAD. Reproduce code: --------------- <?php interface Person { function doSth($sWhat,$sWhere); } class Member implements Person { function doSth($sWhat) { echo "Person does ".$sWhat."\n"; } } $Member = new Member; $Member->doSth('nothing'); ?> Expected result: ---------------- Fatal error: Declaration of Member::doSth() must be the same as Person::doSth() Actual result: -------------- Person does nothing -- Edit bug report at http://bugs.php.net/?id=27623&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27623&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27623&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27623&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27623&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27623&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27623&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27623&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27623&r=support Expected behavior: http://bugs.php.net/fix.php?id=27623&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27623&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27623&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27623&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27623&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27623&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27623&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27623&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27623&r=float

« previous php.bugs (#56577) next »