Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59834 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52875 invoked from network); 13 Apr 2012 01:22:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 01:22:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:43553] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/FF-00290-AEF778F4 for ; Thu, 12 Apr 2012 21:22:51 -0400 Received: by obbta17 with SMTP id ta17so2727277obb.29 for ; Thu, 12 Apr 2012 18:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=3cWwGJfV6AzvlqR1nF4teUF+UIdn+Oolo8cBS3HR4Lg=; b=AdwB14rnG7aIrM4mHF9rQIEed74un1lH4iIaL0bYOu01JIYoM/UERWWQ7YhNbJG2bj cB4GQZpTLQLHKl/0n+Bo0pH7DpMDWyoma9eUxBTl0s2m1ZIXoJQqEpVV4UxcJ2EdZHDx FF/t0zWLZEhglhJ+eI0k6ofqL6ESDHuEHLYVAiQjWm1B/2WrOzYvBlr/g7Ba0ScaN/iD 0UPKP4sRK5gItT7zBCCJ2Fr6ekMvMHK8oc187n1Dcx3ogqxoIDe3vapdodWzZF0TCN+3 Z3MBknguq5YN/svbogRzszDTI7/UMuQ6tRR9EFtdYpVPCSSuih6PKDmdswjIsrahsKH7 t4Tg== Received: by 10.182.177.101 with SMTP id cp5mr408233obc.38.1334280167667; Thu, 12 Apr 2012 18:22:47 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.182.226.9 with HTTP; Thu, 12 Apr 2012 18:22:07 -0700 (PDT) In-Reply-To: References: Date: Fri, 13 Apr 2012 10:22:07 +0900 X-Google-Sender-Auth: PaErBKhs5utorY4S_GWeQnFCUMc Message-ID: To: Kris Craig Cc: PHP internals list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi, 2012/4/13 Kris Craig : > > > On Thu, Apr 12, 2012 at 6:03 PM, Yasuo Ohgaki wrote: >> >> Hi, >> >> If we aren't going to consider saving current code risk, then >> we could use both new include and file name convention. >> >> Introduce application/x-httpd-php-script, then we could >> >> AddHandler php5-script .php >> AddType text/html .php >> AddType application/x-httpd-php-source .phps >> AddType application/x-httpd-php-script =A0 .ph // .phpp .phpc .phpscript >> whatever extension here > > > Yeah that's more or less what I had in mind, actually.=A0 There'd be work > involved, no question, but there's no reason why it shouldn't be doable. > >> >> >> We may need ENV vars for other SAPIs. > > > I'm only familiar with installing PHP on Apache and IIS, so I honestly ha= ve > no idea how it would work with other webservers.=A0 I'd wager that it's > possible enough, but as for the "how," I'll have to defer to those who ha= ve > experience working with said webserver(s). > >> >> >> script/script_once for PHP only script includes. > > > Would the new "script" keyword behave like include or require?=A0 I'm ver= y > wary of the idea of having a special include to treat .php files the same= as > .phpp files, simply because it would seem to add a lot of complexity and > potential for confusion, but I won't necessarily rule it out altogether, > either.=A0 Right now I'm just working on reassuring those who are afraid = this > will cause every single framework on the internet to spontaneously combus= t > lol. Will it? As I wrote in other thread, it convenient for backward compatibility. function script($file) { return include($file); } function script_once($file) { return include_once($file); } It's for new PHP. Why not new keyword. It's true that people are used file extension convention. application/x-httpd-php-script and script/script_once for script only PHP may confuse people. I think it is acceptable, but others may not. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net