Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43292 invoked from network); 16 Apr 2012 19:54:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 19:54:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:60385] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/EC-05733-1E87C8F4 for ; Mon, 16 Apr 2012 15:54:09 -0400 Received: by wibhr14 with SMTP id hr14so4910713wib.11 for ; Mon, 16 Apr 2012 12:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=y1xISGOtTDmv3cIf1iXuBfLtuYOhJgGpzzGzOY+xcCY=; b=KJXeQ3Vi1zTxtvaWOCzn3Fl8a+84t2rNL1AE+zp/zrn43S61GldgjGuSgfox6WQq/x 0nUQZ/iLQQp1wvUes80Zm/e+FAAX9GnuqL1f/Lex9zWNusscyRKx2TkaWlOZ0GbrZu/D X8QTpPcFVVBflsYZVf9YNd4uwmd4gh+gZ4KDgM/nba67xCtsG3bkZdutxvYh4z+ATNPr HF4kPmNztFYRxOWJ7m9KyraqzXXdxIMY1dd59b5+gb3AaWjHcjwrWS/kz6epQu4jU3zA QjG+9o9/fD9/IWY77KXNN+5hhACD+kPHJmHJ2ckyi87sBNUBNcYzMh0wUg/SWkfd6lOP 8PXg== MIME-Version: 1.0 Received: by 10.180.107.234 with SMTP id hf10mr7505678wib.0.1334606046816; Mon, 16 Apr 2012 12:54:06 -0700 (PDT) Received: by 10.223.1.82 with HTTP; Mon, 16 Apr 2012 12:54:06 -0700 (PDT) In-Reply-To: References: <4F8C577D.4010303@developersdesk.com> <4F8C757C.1020400@developersdesk.com> Date: Mon, 16 Apr 2012 12:54:06 -0700 Message-ID: To: Nikita Popov Cc: Rick WIdmer , internals@lists.php.net Content-Type: multipart/alternative; boundary=e89a8f3bab4155e7c204bdd12f80 Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: kris.craig@gmail.com (Kris Craig) --e89a8f3bab4155e7c204bdd12f80 Content-Type: text/plain; charset=ISO-8859-1 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: > >>> > >>> 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 extremely > >> minimal. In 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. It 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. Anyone see any downsides to using "as" instead of comma delination? --Kris --e89a8f3bab4155e7c204bdd12f80--