Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59822 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34306 invoked from network); 13 Apr 2012 00:29:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 00:29:34 -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:52507] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/FB-00290-D63778F4 for ; Thu, 12 Apr 2012 20:29:34 -0400 Received: by iaeh11 with SMTP id h11so4179745iae.29 for ; Thu, 12 Apr 2012 17:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bvro2Rf5EILDXyGEwYPOcKsVWgoDws8ay5K0P4eRsvE=; b=F6maR1eak5ZKXO1UfvC7il+J+9R+MPFsI+UzGF3jcNIpcyGRME4Z57CojK2bQnxnXU ++XzEnzyHqQ+dXcI3dnRj0cmgd8kd3KkE1H8cj8ajJJ7xLhjytRaZy0IOpKvqVtscW1c DMVnESHQYeSH2uyFvn4Vr7YIdEc9CpgIR7acM1IO3KKJQ78SQIUCTRKxVnOw2kDR9RlB +MZ2k6fpSgtTit/kJXmQRriTgLX+NHZGmssfvRGA2VlQ5ozWG/XPmFEQ/CCSsDhNTfO7 dork+Z1H1cBPROS+6wTYQGZ+j6nvZLQxCQEfmb1H373OPikKcjlW26FCdceUDCLKKVrA JCUw== MIME-Version: 1.0 Received: by 10.50.196.165 with SMTP id in5mr60988igc.8.1334276971575; Thu, 12 Apr 2012 17:29:31 -0700 (PDT) Received: by 10.64.134.233 with HTTP; Thu, 12 Apr 2012 17:29:31 -0700 (PDT) Received: by 10.64.134.233 with HTTP; Thu, 12 Apr 2012 17:29:31 -0700 (PDT) In-Reply-To: References: <4F876943.8030105@gmail.com> Date: Fri, 13 Apr 2012 03:29:31 +0300 Message-ID: To: Kris Craig Cc: PHP internals list , Yasuo Ohgaki , David Muir Content-Type: multipart/alternative; boundary=14dae93410ebec3acf04bd8490a0 Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: arvids.godjuks@gmail.com (Arvids Godjuks) --14dae93410ebec3acf04bd8490a0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry, but how will i load a template then? I do that in a controller whose file is.plain php code with no html. Now i'm forced to use some kind of template engine that does not including a template, but parsing it and replacing keywords with data? I really do not have to put a sarcastic phrase here, do i? 13.04.2012 2: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: > On Thu, Apr 12, 2012 at 4:46 PM, David Muir wrote: > > > On 13/04/12 09:38, Yasuo Ohgaki wrote: > > > Hi, > > > > > > 2012/4/13 Kris Craig : > > >> Per recent discussions, I have drafted an RFC for this. This propos= al > > >> offers what I believe to be a more sane and realistic approach to > > >> addressing the question of incorporating a new breed of tag-less PHP > > >> scripts. > > >> > > >> https://wiki.php.net/rfc/phpp > > > This may work for LFI issue for new codes. > > > Few questions. > > > > > > CLI may use .phpp as PHP script always. (i.e. execute w/o else) > > > It's like DOS, though. > > > > > > How do you enforce .phpp as script only for Web? > > > Is it a rule for configuration? or .phpp just never supposed to locat= e > > > under docroot? > > > It relates previous question. How about bootstrap script for > frameworks? > > > > > >> A regular .php script cannot be included from a .phpp script. An > > E_WARNING will be thrown for include and an E_RECOVERABLE_ERROR will be > > thrown for require; in both instances, the included file will be ignore= d. > > > Some people may try to make .phpp handled by web. > > > I cannot tell if this setting is going to be popular, but if it > > > does, isn't it the end of embedded PHP? > > > It might be good if PHP is more tolerant for this usage. > > > > > > Regards, > > > > > > -- > > > Yasuo Ohgaki > > > yohgaki@ohgaki.net > > > > > > > That's a huge WTF that a templating library can't be written as .phpp, > > because it then won't be able to load a template. > > > > That's actually not true. Please refer to the diagram embedded in the RF= C. > > Basically, you can load a template just fine-- you just can't do it > directly from a .phpp file, which you shouldn't be doing, anyway. The > .phpp file is, at least for the most part, intended to be included from a > regular .php file, which also would include whatever you're using for you= r > templates. In other words, they can interact just fine; you just can't p= ut > the template upstream from a .phpp file in the include stack-- which, > again, you really shouldn't be doing, anyway, as it's just bad > architecture. > > > > > > David > > > --14dae93410ebec3acf04bd8490a0--