Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59555 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93815 invoked from network); 9 Apr 2012 21:03:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 21:03:09 -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.217.170 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:63683] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/1D-34074-C8E438F4 for ; Mon, 09 Apr 2012 17:03:08 -0400 Received: by lbbgf7 with SMTP id gf7so2181949lbb.29 for ; Mon, 09 Apr 2012 14:03:04 -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=oMz7Cil8n+d+A4Gtwzmg8buuEeYz3CWPXklQ0qczEMo=; b=RREmFKdRjYH7Qgi4VX3gymT+SegXZDaNm54mc1aXdM+t6Am3JOOh+m4w4pAp5dIPfX 2kOlrrDdaRU1mpX4N6TlqsQUIKZLeUlDYrZmz9lk5SEb7jXIVkBFdsBdTXy1aC8Nsd3D h1yeqgRpJx1emcwK9W6CX5ToO8SXlCukJvQX0KzwcK+tNJSk476M7mPmOrAh0XBZMZE9 2GW5lQ3d1OP5WoRwBqUTs2j6CFLzhi7twC102DYVjkuA4Kv/n1/pzxFHnJMKNENe8ATP gcLQB3Tfr8id9cQHp9K+AYkwGaLb34Nti2lYEXoWHrJzWT6IutBOWKR+N4ZAyxuSpZiS r3DQ== MIME-Version: 1.0 Received: by 10.112.99.198 with SMTP id es6mr288272lbb.66.1334005384508; Mon, 09 Apr 2012 14:03:04 -0700 (PDT) Received: by 10.152.19.106 with HTTP; Mon, 9 Apr 2012 14:03:04 -0700 (PDT) In-Reply-To: <4F834D82.4030601@developersdesk.com> References: <-5877502932356715576@unknownmsgid> <-3647345967307864634@unknownmsgid> <4F831FAE.2030208@ralphschindler.com> <4775322189440202047@unknownmsgid> <4F833682.2000301@ralphschindler.com> <4F833AB0.2060306@sugarcrm.com> <4F8340E6.90005@sugarcrm.com> <4F834D82.4030601@developersdesk.com> Date: Mon, 9 Apr 2012 17:03:04 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlMoskezeoGSRYg7KfpGrxn5xfwOxSDpPF23wiJWhDBAKeQ268OT197WvlhWph+qR4Yeleg Subject: Re: [PHP-DEV] RFC: source files without opening tag From: tom@punkave.com (Tom Boutell) As others explained before the RFC was drafted, file extensions should not be directly respected by PHP because environments differ too much. Instead a convention, NOT enforced at the code level, would be published and encouraged: .phpc for files that start out in PHP mode, and .php for files that start out in HTML mode. PHP would NOT enforce this, it would just be an encouraged practice in the writing of autoloaders and so on. (Note that autoloaders are already concerned with file extensions. They have to be in order to transform a class name into a filename.) The RFC does not call for putting an end to the traditional use of PHP for templates at all, that is still the default behavior when parsing PHP. There is an entirely separate RFC that calls for that, but that's another thread. On Mon, Apr 9, 2012 at 4:58 PM, Rick WIdmer wro= te: > On 4/9/2012 2:41 PM, Kris Craig wrote: >>> >>> >> Honestly, I would suggest just getting rid of "Option 1" altogether. =A0= It >> would end up over-complicating this to such a degree that any usefulness >> it >> might serve would be considerably diminished. >> >> As for embedded HTML, if you allow the ?> =A0tag in these .phpp files, t= hen >> that pretty much negates the entire purpose of having them to begin with= . >> Essentially, you'd just be changing it so that, instead of defaulting to >> "?>" when no tag is present, it defaults to"> value in that as a developer. >> >> A developer should *not* be including in a .phpp file classes that conta= in >> HTML within the ?> =A0tag, period. =A0If they need to include something = that >> has >> that, they should do it in a regular .php file. =A0An "HTML-less" PHP fi= le >> needs to be exactly that; no direct HTML allowed. =A0Otherwise, the RFC = is >> completely and utterly pointless IMHO. >> >> >> I think this would be awesome for PHP 6, but I'll have to vote against i= t >> if you settle on using "Option 1" and/or allow ?> =A0content to be >> embedded/included in .phpp files. =A0If we differentiate based solely on= the >> file extension and keep ?> =A0tags out of it, then I'll definitely suppo= rt >> it! > > > > > Please forget about file extensions. =A0PHP should not consider file > extensions. =A0The only reason .php files are executed by PHP is because = the > web browser is configured to pass that extension to PHP rather than handl= e > it internally. > > > I sincerely hope that any suggestion to eliminate the ability to use PHP = as > a template engine will be met with a veto by the core developers, or mayb= e > even another suggestion by the trademark owner of PHP that he will not al= low > the PHP name to be used on such a language. > > > > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com