Re: UPDATED RFC version 1.1: source files without opening <?php tag

From: Date: Wed, 11 Apr 2012 03:35:17 +0000
Subject: Re: UPDATED RFC version 1.1: source files without opening <?php tag
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-59703@lists.php.net to get a copy of this message
On Tue, Apr 10, 2012 at 10:10 PM, Kris Craig <kris.craig@gmail.com> wrote: > This shouldn't be used to load libraries that dump raw HTML output!  That > literally defeats the entire purpose.  You're also assuming that all PHP > developers do 100% of their coding through pre-existing frameworks. Consider a .phpp file that includes a .php template file when it sees fit, in a render() method. How is this different from an echo() statement? It's not. It's just a convenient form in some situations. By punting these out to .php files we achieve better separation of concerns while still respecting PHP's history as a template language (and possible future if it improves in that area, which it may). All I want is to stop typing <?php and dealing with whitespace screwups above <?php. I want to do that in a way that's practical and interoperable and which people might be able to vote for if they have a nontrivial amount of legacy code in their life, like everybody I work with (: As many have pointed out, plain php template files work for some projects. A viable RFC that people might actually vote for should respect that. It neither picks my pocket nor breaks my leg if someone wants to include .php template files from a .phpp file. I don't have to do it. When you consider that I would be completely unable to use an existing .php library of nontrival code like Amazon's S3 SDK under your proposal without a convoluted workaround it is pretty much a certainty that I would have to vote no if the RFC read that way. >                 (Main Script) >                      | >                      | >          [Included .php/HTML Script] >              |                   | >              |                   | > {Included .phpp Script}      [Included .php/HTML Script from > Framework/Library] This is convoluted and forces me to write a .php frontend. Surely that is not your goal. -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

« previous php.internals (#59703) next »