Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8138 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42726 invoked by uid 1010); 26 Feb 2004 01:52:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42692 invoked from network); 26 Feb 2004 01:52:40 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 26 Feb 2004 01:52:40 -0000 Received: (qmail 24409 invoked by uid 546); 26 Feb 2004 00:08:43 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 26 Feb 2004 00:08:43 -0000 Date: Wed, 25 Feb 2004 19:08:43 -0500 (EST) X-X-Sender: adam@miranda.org To: Marcus Boerger cc: Timm Friebe , internals@lists.php.net In-Reply-To: <1571295527875.20040226002949@marcus-boerger.de> Message-ID: References: <1077748616.685.16.camel@localhost> <1781292779406.20040225234401@marcus-boerger.de> <1077749539.685.27.camel@localhost> <1571295527875.20040226002949@marcus-boerger.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Declaration of Bar::__construct() must be compatible with that of Foo::__construct() From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Thu, 26 Feb 2004, Marcus Boerger wrote: > well for normal methods we must do that. The derived class must support the > same signature that the base class supports. In you example that would only > work if the derived method would have a default parameter for the additional > parameter: > > class Foo { > function connect($server) { > } > } > > class Bar extends Foo { > function connect($server, $port = NULL) { > } > } > ?> When was this change made? I have a CVS check out from yesterday and this is not enforced. This will breaks lots of PHP 4 code. -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!