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 <?@.
And I have no solution for the nesting problem. It's just an interesting issue; if it had a good solution PHP might be a convenient and extensible templating language, as well as being a fast one. I don't think an explicit syntax for this would be "magic," however terse it might be. Calling methods implicitly like Java does, that's magic (: On Mon, Apr 9, 2012 at 12:03 PM, Paul Dragoonis <dragoo...@gmail.com> wrote: > -1. > > PHP doesn't need more magic. > > On Mon, Apr 9, 2012 at 4:53 PM, Nikita Popov <nikita....@googlemail.com> > wrote: >> >> On Mon, Apr 9, 2012 at 5:10 PM, Tom Boutell <t...@punkave.com> wrote: >> > What if PHP supported a short tag for calling a method of $this? >> > >> > Then one could write: >> > >> > <?@escape($foo) ?> >> >> A big -1 on this. >> >> If you want to roll your own template syntax, just do so. It's not >> that hard to run a quick str_replace('<?@', '<?php echo $this->', >> $code) over the template. >> >> Especially consider that @ is already used for error suppression, so >> code that previously just wanted to suppress some errors will suddenly >> try to call class methods (which obviously will lead to fatal errors). >> >> Nikita >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php