Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60030 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81293 invoked from network); 16 Apr 2012 22:56:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 22:56:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:41224] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/94-05733-493AC8F4 for ; Mon, 16 Apr 2012 18:56:21 -0400 Received: by iaeh11 with SMTP id h11so9486276iae.29 for ; Mon, 16 Apr 2012 15:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=E36BFTykTtxWU4SmfmxduZWUPNMjtpD//bTgJNC5ZU4=; b=M0WMdERvKKWvaD3zMSGbEaJQ74Kl6UH11PBTHOvTWhh9CdMvyt2N1rDkKfWrnbtx3M 7W8l/wRHvOCcu+AOQLOALCrfmb40TpXSodPYIG1Cls5FGeben2CXKShTP+xKpRamxPJ4 0GKH+MQPGHElPSaiUx8smJCUipaZ/rUFgPFDjYUPC/Mm/xwRwE3/UwP/sZ/qvHaw2PmK gXqVn6CZABmXmBBqLDMpk0f9t0IC/NWEmQpeszHWud3duI1fniuClEtOmjQzp4z7HWnv D6Y+co+r2gRDVhVjL0YffhIJU48AA80D+I0fu6KTrzmRiTbbR9ly1pqeiUE+lCwX8fn0 V2Og== Received: by 10.50.190.167 with SMTP id gr7mr7325749igc.8.1334616977970; Mon, 16 Apr 2012 15:56:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.134.233 with HTTP; Mon, 16 Apr 2012 15:55:53 -0700 (PDT) In-Reply-To: References: <4F8C577D.4010303@developersdesk.com> Date: Tue, 17 Apr 2012 01:55:53 +0300 Message-ID: To: Kris Craig Cc: Rick WIdmer , internals@lists.php.net Content-Type: multipart/alternative; boundary=f46d0447850fe214da04bdd3bafc Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: arvids.godjuks@gmail.com (Arvids Godjuks) --f46d0447850fe214da04bdd3bafc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 16 =D0=B0=D0=BF=D1=80=D0=B5=D0=BB=D1=8F 2012 =D0=B3. 22:02 =D0=BF=D0=BE=D0= =BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Kris Craig =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > On Mon, Apr 16, 2012 at 10:31 AM, Rick WIdmer >wrote: > > > On 4/16/2012 3:31 AM, Arvids Godjuks wrote: > > > >> That's sad really, to be honest. > >> I wonder if people even use this: > >> > >> echo include 'foo.bar', 'baz'; > >>> > >> > > Probably not, Try it! you get: > > > > 1baz > > > > It actually works more like > > > > echo (include "foo.bar"), 'baz'; > > > > than > > > > > > echo include( "foo.bar"), 'baz'; > > > > > > > > More important include doesn't currently allow multiple parms: > > > > include "foo.bar", 'baz'; > > > > Parse error: syntax error, unexpected ',' in bla.php on line xx > > > > > > > > > > Rick > > > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > I'll reiterate my position that I'm not ready to bring my RFC to a vote; > and even if I was, the rules wouldn't allow it. In fact, unless I'm > mistaken, none of the RFCs have met the 2-week minimum requirement yet, s= o > no vote can take place at this time. But I do think we're making progres= s, > so I would ask for a little extra patience from the peanut gallery for > now. =3D) > > To Arvids' point, I'm definitely leaning in that direction, but I'd like = to > hear a little bit more from anyone who believes a different approach woul= d > be better. If nobody speaks-up, I'll just assume that we have consensus = on > that point and add it to the RFC. > > 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). So if it does pose a change, > I'd be surprised if any existing scripts would be affected. And since th= is > is a major version increment we're talking about here, I think a small > amount of allowance can be made for low-impact BC breakage IMHO. > > How about we just keep the parentheses optional and comma-seperate the > arguments? For example, the require syntax could look like this: > > require[(] $script_filename, $script_type =3D PHP_SCRIPT_TYPE_NORMAL [)]; > > Possible values for $script_type: > > PHP_SCRIPT_TYPE_NORMAL (0x01) > > - If the included file contains PHP code, parse it. > > > PHP_SCRIPT_TYPE_TAGLESS (0x02) > > - Code is assumed to be PHP throughout the script. The E_NOTICE and the ?> tag throws E_RECOVERABLE_ERROR. > > > PHP_SCRIPT_TYPE_STACK (0x04) > > - The $script_type is applied to all child scripts of the one being > included. > - Question : Would anyone see value in adding an override constant that= , > while not recommended, allows the developer to apply a different > $script_type somewhere deeper in the stack? Personally this doesn't > sound > useful to me, but I'd be willing to put it in if enough of you wanted i= t. > > > PHP_SCRIPT_TYPE_CODE_FILE (PHP_SCRIPT_TYPE_NORMAL & > PHP_SCRIPT_TYPE_TAGLESS) > > - The entire script is assumed to be PHP code and is parsed accordingly= . > > > PHP_SCRIPT_TYPE_CODE_STACK (PHP_SCRIPT_TYPE_NORMAL & > PHP_SCRIPT_TYPE_TAGLESS & PHP_SCRIPT_TYPE_STACK) > > - The entire script and all its child scripts (i.e. its "stack") are > assumed to be PHP code and parsed accordingly. > > > What do you think? > > --Kris > I think there is no need for that many constants and types of inclusion. Just a PHP_SCRIPT_TYPE_NORMAL and PHP_SCRIPT_TYPE_CODE will suffice (the later just expects the or