Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3367 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20920 invoked from network); 11 Jul 2003 19:39:57 -0000 Received: from unknown (HELO localhost.localdomain) (165.206.47.34) by pb1.pair.com with SMTP; 11 Jul 2003 19:39:57 -0000 Received: from tonybibbs.com (localhost [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h6BJdtCs003551 for ; Fri, 11 Jul 2003 14:39:56 -0500 Message-ID: <3F0F128B.5070809@tonybibbs.com> Date: Fri, 11 Jul 2003 14:39:55 -0500 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: php5 interfaces... From: tony@tonybibbs.com (Tony Bibbs) In PHP5 I noticed this behaviou with interfaces. If I have an interface with a method that takes no paramaters, an implementing class for that interfaces can have the same method take parameters...is that right? For example: interface foo { public function myFunction(); } class foobar implements foo { public function myFunction($someText) { echo $someText; } } $myObj = new foobar(); $myObj->myFunction('Testing, 1, 2, 3'); This code works. To me it should flag an error or, at least a warning, no? I can see the flexibility of allowing this as it provides a kind-of form of overloading but I want to make sure this behaves as intended before I make use of this feature/bug. --Tony