Re: Re: Go for votes for the open tag-less PHP files

From: Date: Mon, 16 Apr 2012 21:30:43 +0000
Subject: Re: Re: Go for votes for the open tag-less PHP files
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-60020@lists.php.net to get a copy of this message
This has been added in version 1.1.1 of the source_files_without_opening_tag RFC: https://wiki.php.net/rfc/source_files_without_opening_tag On Mon, Apr 16, 2012 at 5:25 PM, Tom Boutell <tom@punkave.com> wrote: > I think the 'as' solution is smart. > > On Mon, Apr 16, 2012 at 3:54 PM, Kris Craig <kris.craig@gmail.com> wrote: >> On Mon, Apr 16, 2012 at 12:51 PM, Nikita Popov <nikita.ppv@googlemail.com>wrote: >> >>> On Mon, Apr 16, 2012 at 9:39 PM, Rick WIdmer <vchkpw@developersdesk.com> >>> wrote: >>> > On 4/16/2012 1:02 PM, Kris Craig wrote: >>> >> >>> >> On Mon, Apr 16, 2012 at 10:31 AM, Rick >>> >> WIdmer<vchkpw@developersdesk.com>wrote: >>> >>> >>> >>> >>> >>> 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 > > > > -- > Tom Boutell > P'unk Avenue > 215 755 1330 > punkave.com > window.punkave.com -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

« previous php.internals (#60020) next »