Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60011 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41992 invoked from network); 16 Apr 2012 19:51:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 19:51:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:36527] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/9C-05733-9487C8F4 for ; Mon, 16 Apr 2012 15:51:38 -0400 Received: by lbbgf7 with SMTP id gf7so4284740lbb.29 for ; Mon, 16 Apr 2012 12:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=kmH8Nl3K7j5/MesTSqIV9xzJPL/Wzh3xzGn70OBz/G4=; b=CHRvXuaSOJ9nbkDSvBaCTSlQv0joZS0l+dce1t3vlr9hg3pcfvMObabnVH/JoEpeLD 11icBPvuFHXOHdqJlhJnqvJsnUxo/Y4DoH/e1XbYXIW8+dZ4q8ihCCtgi8eMH1Ng2UwW 7LvyDqJYDn1HcFzY6TR24h37/G4HSVO+o+5vZFOwAP9Qc4tJNd5SZlt9l8JF9f8+Kfhx MO18ErUmzjO+Yr+m2M0XWV5mJjnYMkLJg3QrWuEjbcNahmjLDF722nYzntXpeJHmLlr9 VQzHl3bpAtj/+IouK+qJd/zoq3pTnKMZDS562qC/rW0OgUbJsjo2Id/00LMvR1IU49Gq tVIg== MIME-Version: 1.0 Received: by 10.152.103.134 with SMTP id fw6mr11518347lab.20.1334605894485; Mon, 16 Apr 2012 12:51:34 -0700 (PDT) Received: by 10.152.127.68 with HTTP; Mon, 16 Apr 2012 12:51:34 -0700 (PDT) In-Reply-To: <4F8C757C.1020400@developersdesk.com> References: <4F8C577D.4010303@developersdesk.com> <4F8C757C.1020400@developersdesk.com> Date: Mon, 16 Apr 2012 21:51:34 +0200 Message-ID: To: Rick WIdmer Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: nikita.ppv@googlemail.com (Nikita Popov) On Mon, Apr 16, 2012 at 9:39 PM, Rick WIdmer wr= ote: > 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 extremely >> minimal. =A0In the 10+ years I've been developing PHP, I don't think I'v= e >> 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