Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4321 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91769 invoked by uid 1010); 31 Aug 2003 15:56:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91745 invoked by uid 1007); 31 Aug 2003 15:56:09 -0000 Message-ID: <20030831155609.91744.qmail@pb1.pair.com> To: internals@lists.php.net Date: Sun, 31 Aug 2003 12:56:10 -0300 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Posted-By: 200.196.104.198 Subject: problem with interfaces From: cunha17@uol.com.br ("Cristiano Duarte") Hi all, Is this supposed to work? interface test { function my_function ($mandatory_parameter); } class test_class implements test { function my_function ($mandatory_parameter, $optional_parameter = null) { } } The test_class class implements correctly the 'test' interface since PHP does not allow multiple explicit method declarations (explicit overloading). IMHO, if all additional parameters are optional, the interface commitment is preserved. Cristiano Duarte