Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57000 invoked from network); 16 Apr 2012 21:25:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 21:25:36 -0000 Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:39725] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/7F-05733-F4E8C8F4 for ; Mon, 16 Apr 2012 17:25:35 -0400 Received: by yhfq11 with SMTP id q11so3110658yhf.29 for ; Mon, 16 Apr 2012 14:25:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=4eDmJfNRDOIevMMqf+wlDzvMCnw7RKgqTpoVEzWuSDs=; b=hstE3YLcoRB88mC1YErI6teR3jC4SxsnjVD4azeqHDCzCBxi0MRkIxpcZVtm0Etjxx 0fHGexvCEHqq05CPjqrGIVbIqTW/0TRg3MpWBcXlbWzO1c1T8cL6c0kl1fNzwy0ndSqT SSgKzulzl1DYk9B7tjGXr+yDUdRxc1Gd3fMkYPjNRu3yoFfiJ1I69tia4Ngd2SWvl6Hp 7eDH93bMGf88C0mRFjm7BaUlSC0GCved4uaKKMT3vL6Z1/2jd/aoGIDOx1fa25AQy6nY oDRcVkaIv/5D2JnqvXWK+mHw/bzKe364DmTmDTOfnRAL9fKnwslqrzdK5omIu2HyXSvt 9esg== MIME-Version: 1.0 Received: by 10.101.144.2 with SMTP id w2mr3679497ann.30.1334611532639; Mon, 16 Apr 2012 14:25:32 -0700 (PDT) Received: by 10.101.57.14 with HTTP; Mon, 16 Apr 2012 14:25:32 -0700 (PDT) In-Reply-To: References: <4F8C577D.4010303@developersdesk.com> <4F8C757C.1020400@developersdesk.com> Date: Mon, 16 Apr 2012 17:25:32 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQky+cHJqpTTvITdckAWKYL4VeBmtRBQWeCqvUWTt3ZFSmBX3r8lbsxnh8F85371dMIXjzQi Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: tom@punkave.com (Tom Boutell) I think the 'as' solution is smart. On Mon, Apr 16, 2012 at 3:54 PM, Kris Craig wrote: > On Mon, Apr 16, 2012 at 12:51 PM, Nikita Popov wrote: > >> On Mon, Apr 16, 2012 at 9:39 PM, Rick WIdmer >> wrote: >> > On 4/16/2012 1:02 PM, Kris Craig wrote: >> >> >> >> On Mon, Apr 16, 2012 at 10:31 AM, Rick >> >> WIdmerwrote: >> >>> >> >>> >> >>> More important include doesn't currently allow multiple parms: >> >>> >> >>> =A0 include "foo.bar", 'baz'; >> >>> >> >>> Parse error: syntax error, unexpected ',' in bla.php on line xx >> >> Regarding include/require, I agree that any BC break would be extreme= ly >> >> minimal. =A0In the 10+ years I've been developing PHP, I don't think = I've >> >> ever once seen somebody include multiple scripts on a single line (I >> >> wasn't even aware that such a thing was allowed). >> > See above. =A0It is not allowed now. >> >> I think there is a misunderstanding here. Inclusions with two >> arguments are currently not allowed, yes. The point is that adding >> such a second argument would make the grammar ambiguous. >> >> E.g, consider this: >> >> func(include 'foo', $someThing); >> >> Currently this is interpreted as the return value of 'foo' and the >> variable $someThing being passed to func. >> >> If you add a second argument it's unclear what this does. Is this a >> two-argument include? I.e. should it be interpreted as >> >> func((include 'foo', $someThing)); >> >> Or is this a one-argument include and should be interpreted as >> >> func((include 'foo'), $someThing); >> >> In my eyes such an ambiguity renders any proposal to add another >> argument to include completely unacceptable. >> >> The only option is to add a dedicated syntax for it like >> >> include 'foo' as $flags; >> >> Nikita >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > Hmm I like that idea. =A0Anyone see any downsides to using "as" instead o= f > comma delination? > > --Kris --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com