Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50488 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20812 invoked from network); 25 Nov 2010 02:09:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2010 02:09:30 -0000 Authentication-Results: pb1.pair.com header.from=colder@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=etienne.kneuss@epfl.ch; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain epfl.ch from 128.178.224.226 cause and error) X-PHP-List-Original-Sender: etienne.kneuss@epfl.ch X-Host-Fingerprint: 128.178.224.226 smtp3.epfl.ch Linux 2.6 Received: from [128.178.224.226] ([128.178.224.226:35635] helo=smtp3.epfl.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/06-12084-755CDEC4 for ; Wed, 24 Nov 2010 21:09:28 -0500 Received: (qmail 15857 invoked by uid 107); 25 Nov 2010 02:09:24 -0000 X-Virus-Scanned: ClamAV Received: from vpn-a-183-060.epfl.ch (128.178.183.60) by smtp3.epfl.ch (AngelmatoPhylax SMTP proxy) with ESMTP; Thu, 25 Nov 2010 03:09:24 +0100 Received: by croustillant.local (Postfix, from userid 501) id B8F0B1F2EBBA; Thu, 25 Nov 2010 03:03:33 +0100 (CET) Date: Thu, 25 Nov 2010 03:03:33 +0100 To: "internals@lists.php.net" Message-ID: <20101125020333.GA376@croustillant.local> References: <1DFD5821-B2F2-4212-9CB1-8D434123B101@zort.net> <20101124173501.GB72409@croustillant.local> <4CED6155.1000606@sugarcrm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CED6155.1000606@sugarcrm.com> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [PHP-DEV] Add E_STRICT when defining a required function parameter after an optional parameter From: colder@php.net (Etienne Kneuss) On Nov 24 11:02:45, Stas Malyshev wrote: > Hi! > > >Given the semantics of PHP arguments, there is "nothing wrong" with > >defining a required argument after an optional one, and in some cases > >it is required. Consider: > > I think there's something wrong with it, primarily - the fact that > it doesn't really make any sense. The object/null thing is a kludge. > Unfortunately, I don't see a proper way to handle this without named > arguments. Sure, it's hackish as hell, but that's PHP's fault, not the user using it. My point is that we shouldn't add new E_STRICTs for something with no possible alternatives. > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 -- Etienne Kneuss http://www.colder.ch