Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39194 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66392 invoked from network); 22 Jul 2008 15:21:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2008 15:21:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.141.85.117 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.141.85.117 uf1.search.ch Linux 2.6 Received: from [195.141.85.117] ([195.141.85.117:45428] helo=smtp.rim.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/97-46193-20BF5884 for ; Tue, 22 Jul 2008 11:21:40 -0400 Received: from localhost (localhost [127.0.0.1]) by rolig.search.ch (Postfix) with ESMTP id 12BCD4A556D; Tue, 22 Jul 2008 17:21:36 +0200 (CEST) Received: from smtp.rim.ch ([127.0.0.1]) by localhost (search.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24951-07; Tue, 22 Jul 2008 17:21:32 +0200 (CEST) Received: from [192.168.1.72] (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rolig.search.ch (Postfix) with ESMTP id 13E0B4A556C; Tue, 22 Jul 2008 17:21:32 +0200 (CEST) Message-ID: <4885FAFB.9050505@cschneid.com> Date: Tue, 22 Jul 2008 17:21:31 +0200 User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: internals@lists.php.net References: <10845a340807220737v47c7ed5dm37d272007ff33521@mail.gmail.com> In-Reply-To: <10845a340807220737v47c7ed5dm37d272007ff33521@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at search.ch Subject: Re: [PHP-DEV] Modify language grammar to allow commas to skip defaulted parameters. From: cschneid@cschneid.com (Christian Schneider) Richard Quadling wrote: > Actually, would allowing PHP to skip defaulted parameters be a better > facility to add? > > function foo($opt1 = Null, $opt2 = Null){} > > foo(,True); I agree that it would be ugly but possibly useful. OTOH I think it's better to switch to named parameters in such a case anyway. But actually it's orthogonal to the original question whether trailing commas are allowed or not so I'd suggest starting a new thread if you want to change the topic ;-) - Chris