News for hackers. Stuff that matters.
Re:Show HN: A PHP parser written in PHP by bithive123 on Wednesday February 22, 2012 @06:51PM (#3623088)
This must be a stupid question because I've noticed that it's commonplace, but why do PHP-based projects try to build templating systems in PHP? Do they not realize that the original use case for PHP was to turn plain HTML files into dynamic templates?

I saw this in Horde, the other day; mixed in with the usual PHP tags they had added their own XML tags for doing "if/else" type things in the template. What is the purpose of that?

Re:Show HN: A PHP parser written in PHP by geon on Thursday February 23, 2012 @06:26AM (#3624540)
I believe it's an attempt to assure there is no logic in the template code.

...which I think is retarded and anal, since the important part is separation of business logic and presentation. There is bound to be some level of display logic, which is why most template languages have loops and conditionals. But if you are going that far, why not just use PHP? It is arguably a very good template language.