3 ms·
No chance. The problem was a missing <?php tag -- PHP syntax cheching would NOT have raised alarm, because everything before a <?php tag is not considered PHP.
by dexen 16y ago
No chance. The problem was a missing <?php tag -- PHP syntax cheching would NOT have raised alarm, because everything before a <?php tag is not considered PHP.
Forcing every file to start with <?php is just PITA for developers working on templates.
- bluesnowmonkey 16y agoIf the templates are raw PHP, yeah. Constructing HTML in code like that is a PITA and a recipe for errors and XSS vulnerabilities. It's common to use templating engines like Smarty or Mustache. In that case, you can standardize on PHP files starting with an opening tag and having no closing tag. Then syntax checking is a piece of cake.
- dexen 16y agoAfter using eZ Publish with its templating language (also implemented in PHP) for about a year, I've found `raw' PHP just more expressive and concise -- and my team, coming from various backgrounds, has that preferrence as well. Whaddya know, PHP is a templating language, after all. Also, it takes us less effort to ship product that matches performance requirements with `raw' PHP than with another layer of abstraction.
- russss 16y ago> Forcing every file to start with <?php is just PITA for developers working on templates. Yep, our templates were .tpl files, which is probably a good convention to have even if you use raw PHP as your templating language. But you get the drift. This is something you have to deal with when you use PHP.