Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60004 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13127 invoked from network); 16 Apr 2012 14:45:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 14:45:24 -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.170 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:38254] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/48-05733-C703C8F4 for ; Mon, 16 Apr 2012 10:45:23 -0400 Received: by yenl5 with SMTP id l5so2787763yen.29 for ; Mon, 16 Apr 2012 07:45:13 -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=xaTLExGdpoTGCSusJ4EWxd1n+DIvEbbvCZxBHxFS0YE=; b=Md3mk07KnEVqt2BdEjcPMO0l5jfR/n03oun60eJb9U4odOxaF+h+TnZsNGW7QTM7A1 VUz2bbH78QoBIIc5iHjNnbH6I+YfPPu5X+rrwLCZcJiB5kbNxiNsQMMYP5VVH1TfTfnT sSCeYgbCY8vd7DLM0UOGDXCjQhPshJEwB9v/yz9zhkhefBKDE8ZgdhIIAOpYXypxE78z jRP4bA9CZJgMr7S2DFlXjkda3eiM6lBiEGPKWmSI6w0VqnFqpDs5jfsSeg1CORUKm69u X+Wo7HJA/KIUk7jk/IeN85TKl11rL2GxmUqnVhj/5QMd5dj3iG0W1hnQEgf6kipNhWkf ehXw== MIME-Version: 1.0 Received: by 10.236.79.40 with SMTP id h28mr11585882yhe.50.1334587513706; Mon, 16 Apr 2012 07:45:13 -0700 (PDT) Received: by 10.101.57.14 with HTTP; Mon, 16 Apr 2012 07:45:13 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Apr 2012 10:45:13 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmCJSLrTC9lshOnV9UcvNbgysbusXrX5KnIX1zt0mlkZY8k8H/BY8uWyPfuRWfKEDM/pK1A Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: tom@punkave.com (Tom Boutell) For some this is sufficient, for others (like myself) getting rid of the initial wrote: > 16 =C1=D0=D2=C5=CC=D1 2012 =C7. 11:05 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC= =D8 Kris Craig =CE=C1=D0=C9=D3=C1=CC: > >> Arvids, >> >> >> On Mon, Apr 16, 2012 at 12:46 AM, Arvids Godjuks > > wrote: >> >>> What happened with the proposal/RFC for expanding include/require with >>> additional optional second param to allow for developers to define in p= lace >>> if he want's a pure PHP file to be included or a template file with dir= ect >>> HTML output? >>> I like that proposal and take it over any other, because it gives >>> developer a choice. And if things do not go the right way and he ends u= p >>> screwing up somewhere - he is able to fall back to the old mode just by >>> modifying the include/require statement (and in a MVC framework with >>> autoload usage that would be 1-2 places in the whole project). >>> All that stuff with keywords, removing >> extensions require a continuous effort from the developers, additional >>> support from the IDE/editors/other tools. Do we really need all that ju= st >>> to give people the ability to load their scripts as a pure PHP code? >>> To my mind a modification to the include/require statements is all ther= e >>> is required to add that extra thing that Kris want's so badly and does = not >>> require to change your habbits, IDE templates, waiting for IDE/editors/= WEB >>> source code highlight libraries/source analyzers/etc to catch up with t= he >>> change. >>> There is also a question I just raised that is not yet answered that th= e >>> keyword/extension thing can just break the valid performance tweak >>> technique, that is used extensively in any project with big code base. >>> >> >> That may very well be the method proposed in my RFC, too. =9AI haven't m= ade >> up my mind on that point as I'd like to cover the pros/cons a little mor= e >> in depth (including the potential perf issue you just raised). =9AA hand= ler >> approach or something similar will still be necessary as well, since one >> key reason for my RFC was to make it so that these scripts could be >> executed directly via the webserver. =9ABut as for determining how PHP i= tself >> can identify a .phpp file, I think the three best options are: =9ACreate= new >> tags, create new keywords, or create new parameters to existing keywords= . >> =9AI keep bouncing back and forth on which one I think is best, which te= lls >> me that I need to hear more debate on that. =9AThoughts? >> >> --Kris >> >> I would encourage you to take a deep look into modifying the > include/require statements, because for all the issues popped out with > .pphp and keywords they just don't exist with include/require. And there = is > no need to remove the start first thing in the file and there is no ?> at the end and hey (for = my > case - my IDE removes all leading and trailing spaces on file save), your > include 'file', PHP_SOURCE_ONLY; works fine, but including a template > fails =9A(as does an image with embedded tags uploaded through a > security hole) . > It's clean (although some BC break would occur, but I think it's minor), > simple and 100% voluntary. Any decently written 3rd party library will wo= rk > without any modification (well, removing trailing ?> is a matter of simpl= e > script if required, but I haven't seen people putting ?> in the end for > years). --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com