Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60003 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2979 invoked from network); 16 Apr 2012 13:38:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 13:38:35 -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.160.170 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:54129] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/96-05733-AD02C8F4 for ; Mon, 16 Apr 2012 09:38:35 -0400 Received: by ghbg2 with SMTP id g2so2712107ghb.29 for ; Mon, 16 Apr 2012 06:38:32 -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=DaVI7buFrzHtcQoS0EnfC78olPJBuOeKtbGo6zPVE+A=; b=eGXIyjXe75dv09ItfzaS7i0hGzZAAimKsvvf6OPzSsH6FReYqeYCZxt2EQhU3hXiTj YUdIXAgVYRsvgLhyAVEAb6r2h7JeDpltuKG2YHlrBgHmCMrGtz40gTBE8FxdV2OH93+i nDG5OOwJvtGFvZb4w5Fjqzww4JEbsi+hGzcymcx4opzotQSACO2xrv5K5w8MU1pk2JTY qAb7R1A5E+MIipCgnnzi0UUCjcL3vd5GZMu2c07LhsqdVVLy9qmLVhiNJJSHKVUgNtgU 2RPUfDj8UZUIIT4LRB8E/1GF0L62eIXnS4IH8ePxv1bN63ZtDmoPClGg856NB5kigVYF pulw== Received: by 10.50.196.165 with SMTP id in5mr5777217igc.8.1334583512125; Mon, 16 Apr 2012 06:38:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.134.233 with HTTP; Mon, 16 Apr 2012 06:38:10 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Apr 2012 16:38:10 +0300 Message-ID: To: Kris Craig Cc: Yasuo Ohgaki , Pierre Joye , PHP internals , Tom Boutell , Moriyoshi Koizumi Content-Type: multipart/alternative; boundary=14dae93410eb29d01904bdcbf030 Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: arvids.godjuks@gmail.com (Arvids Godjuks) --14dae93410eb29d01904bdcbf030 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. 11:05 =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: > 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 pl= ace >> if he want's a pure PHP file to be included or a template file with dire= ct >> 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 up >> 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 jus= t >> 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 there >> is required to add that extra thing that Kris want's so badly and does n= ot >> require to change your habbits, IDE templates, waiting for IDE/editors/W= EB >> source code highlight libraries/source analyzers/etc to catch up with th= e >> change. >> There is also a question I just raised that is not yet answered that the >> 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. I haven't made > up my mind on that point as I'd like to cover the pros/cons a little more > in depth (including the potential perf issue you just raised). A handler > 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. But as for determining how PHP itse= lf > can identify a .phpp file, I think the three best options are: Create ne= w > tags, create new keywords, or create new parameters to existing keywords. > I keep bouncing back and forth on which one I think is best, which tells > me that I need to hear more debate on that. Thoughts? > > --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 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 (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 work without any modification (well, removing trailing ?> is a matter of simple script if required, but I haven't seen people putting ?> in the end for years). --14dae93410eb29d01904bdcbf030--