On 2012-04-09, Tom Boutell <t...@punkave.com> wrote:
> There's a reason I didn't try to kick this out as a fully formed RFC (:
>
> The choice of @ is a nonstarter, yes. I forgot that <? is a valid
> start code for PHP already so it is already valid PHP to write <?@.

Another tack to take is to use PHP's streams support. We did this in
ZF's Zend_View at one point to emulate short tags when they're disabled.
Basically, it allows you to pre-process the template file as it's being
included.

The downside is, of course, performance. However, you could very easily
add a caching layer to this as well to cache the modified code so that
subsequent calls do not have to do the pre-processing.

Basically, I think this is something that can be accomplished in
userland.


-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to