Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25494 invoked from network); 13 Apr 2012 00:04:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 00:04:07 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:54152] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/0A-00290-57D678F4 for ; Thu, 12 Apr 2012 20:04:06 -0400 Received: by werh12 with SMTP id h12so1892419wer.29 for ; Thu, 12 Apr 2012 17:04:02 -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=KwLL0QB+QbPHBg9BJdAXcH5RjMKjIBJY4uNMfv1ADa4=; b=woYDlt8MfsN8x3gZepP5rb4K+FBKEAwsQzUFD2+IhmBK+5hgeqlVLnEmYsW2eqaHI5 sUoAiO1BUW2pe2c1OaFEdWJTSKyj67ocd40ieasFQjw+FroQev226UQAmklKzkbg1VUl jMOWTEfspxgG404z9MV6nwTtCZXN52U0zKcFC64ik91uemiCCeSSKPz9gWi2CiNXQF7j EuIq7Se0AMfqAZsYq7NXeZ7HS2ydsl1ZRdWmPNCeSkY1HjCuWm7BM4wlfMrdCIWBIlj4 p2ijy6uu02HuuXDI0wLtzJj3n+IUbQ5iRhrdvvQdA+lINL9AQgIgTzAqeaWuvX/9UNHn JWJA== MIME-Version: 1.0 Received: by 10.216.131.212 with SMTP id m62mr115466wei.20.1334275441911; Thu, 12 Apr 2012 17:04:01 -0700 (PDT) Received: by 10.223.79.67 with HTTP; Thu, 12 Apr 2012 17:04:01 -0700 (PDT) In-Reply-To: <4F876943.8030105@gmail.com> References: <4F876943.8030105@gmail.com> Date: Thu, 12 Apr 2012 17:04:01 -0700 Message-ID: To: David Muir Cc: Yasuo Ohgaki , PHP internals list Content-Type: multipart/alternative; boundary=0016e6d460bebf67c204bd843542 Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: kris.craig@gmail.com (Kris Craig) --0016e6d460bebf67c204bd843542 Content-Type: text/plain; charset=ISO-8859-1 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 proposal > >> 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 > 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 locate > > 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 ignored. > > 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 RFC. 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 your templates. In other words, they can interact just fine; you just can't put 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 > --0016e6d460bebf67c204bd843542--