Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25784 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75358 invoked by uid 1010); 21 Sep 2006 14:46:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75343 invoked from network); 21 Sep 2006 14:46:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Sep 2006 14:46:22 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 81.169.182.136 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from [81.169.182.136] ([81.169.182.136:36024] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/83-49133-CB5A2154 for ; Thu, 21 Sep 2006 10:46:21 -0400 Received: from localhost (strato.aixcept.de [81.169.182.136]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 8E8FC35C1E4; Thu, 21 Sep 2006 16:46:16 +0200 (CEST) Date: Thu, 21 Sep 2006 07:46:13 -0700 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <783278347.20060921074613@marcus-boerger.de> To: Christian Schneider Cc: PHP Developers Mailing List In-Reply-To: <4511925F.5060602@cschneid.com> References: <4511925F.5060602@cschneid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Parameter checking in 5.2 From: helly@php.net (Marcus Boerger) Hello Christian, the short form is, use interfaces. And the long form is read the upgrade file and find out to use interfaces :-) best regards marcus Wednesday, September 20, 2006, 12:11:27 PM, you wrote: > In the discussion about parameter checking in 5.2 I proposed to relax > the checks a tiny little bit: Don't test static functions (e.g. useful > for factory methods) and allow adding default values to functions (the > object of the inherited class still accepts the same parameters as the > base class). A patch is attached. > Example: > class Base > { > static function factory($x) { } > function foo($x) { } > } > class Spezialized extends Base > { > static function factory() { } # Static method, e.g. factory method > function foo($x = null) { } # Default values for specialized class > } > Regards, > - Chris Best regards, Marcus