note 68773 added to language.oop5.interfaces
| From: | vbolshov at rbc dot ru | Date: | Thu, 10 Aug 2006 09:34:00 +0000 |
| Subject: | note 68773 added to language.oop5.interfaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115749@lists.php.net to get a copy of this message | ||
Consider the following:
[vbolshov@localhost tmp]$ cat t.php
<?php
error_reporting(E_ALL | E_STRICT);
interface i {
function f($arg);
}
class c implements i {
function f($arg, $arg2 = null)
{
}
}
?>
[vbolshov@localhost tmp]$ php t.php
[vbolshov@localhost tmp]$
PHP doesn't generate a Fatal Error in this case, although the method declaration in the class
differs from that in the interface. This situation doesn't seem good to me: I'd prefer
classes being strictly bound to their interfaces.
----
Server IP: 66.163.161.117
Probable Submitter: 80.68.252.11
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php
Edit -- https://master.php.net/note/edit/68773
Del: integrated -- https://master.php.net/note/delete/68773/integrated
Del: useless -- https://master.php.net/note/delete/68773/useless
Del: bad code -- https://master.php.net/note/delete/68773/bad+code
Del: spam -- https://master.php.net/note/delete/68773/spam
Del: non-english -- https://master.php.net/note/delete/68773/non-english
Del: in docs -- https://master.php.net/note/delete/68773/in+docs
Del: other reasons-- https://master.php.net/note/delete/68773
Reject -- https://master.php.net/note/reject/68773
Search -- https://master.php.net/manage/user-notes.php