ID: 27623
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: debian linux
PHP Version: 5CVS-2004-03-17 (dev)
New Comment:
This is correct behavior now, turn on E_STRICT and E_ALL and you'll see
it.
Previous Comments:
------------------------------------------------------------------------
[2004-03-17 05:46:43] [EMAIL PROTECTED]
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 this bug report at http://bugs.php.net/?id=27623&edit=1