Newsgroups: php.general,php.internals Path: news.php.net Xref: news.php.net php.general:178959 php.internals:8182 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52567 invoked by uid 1010); 26 Feb 2004 19:44:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52522 invoked from network); 26 Feb 2004 19:44:48 -0000 Received: from unknown (HELO mail.3gstech.com) (216.239.132.110) by pb1.pair.com with SMTP; 26 Feb 2004 19:44:48 -0000 Received: by mail.3gstech.com (Postfix, from userid 99) id CC8AE9E76BB; Thu, 26 Feb 2004 11:44:47 -0800 (PST) Received: from www.buildabetterweb.com (www.buildabetterweb.com [216.239.132.101]) by www.3gstech.com (IMP) with HTTP for ; Thu, 26 Feb 2004 11:44:47 -0800 Message-ID: <1077824687.403e4cafbb4d6@www.3gstech.com> Date: Thu, 26 Feb 2004 11:44:47 -0800 To: news@eecoo.de Cc: php-general@lists.php.net, internals@lists.php.net References: <20040226185122.34071.qmail@pb1.pair.com> <1077821587.403e409400404@www.3gstech.com> <20040226190236.59641.qmail@pb1.pair.com> In-Reply-To: <20040226190236.59641.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 Subject: Re: [PHP-DEV] PHP5: Class behavior: method overloading From: waboring@3gstech.com ("Walter A. Boring IV") Quoting Vivian Steller : > Walter A. Boring IV wrote: > > > I say keep compatibility. If you want to enforce this, then declare an > > interface. That is after all why they exist. > > > > Walt > ... > > Would be nice if you could give a simple example - i really have problems > working with interfaces :( interface Entry function __construct($name, $path); } class Folder implements Entry { var $name = ''; var $path = ''; function __construct( $name, $path ) { $this->name = $name; $this->path = $path; } } > > > how could i implement my interfaces? I think interfaces wouldn't solve php4 > compatibility problems... ----well, if you are implementing something completely new in php5, there there are no compatibility issues. I have many classes in my projects in php4. I'm not sure of how many child constructors have different parameters (my guess is not many), but enforcing strict parameter count for childs classes would break compatibility. Which is why I think that one should just use an interface to enforce this rule. It seems like the right place for it. my $0.02 Walt