Re: templates with php

From: Date: Mon, 31 Jul 2000 19:16:19 +0000
Subject: Re: templates with php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9241@lists.php.net to get a copy of this message
> I never understood why people are so insistent on using something like > @title@ instead of <?title()?> at the cost of an order of magnitude of > performance degradation. I have to agree with this (or the alternate <?=$Title?>). PHP has a good parser that a lot of people have spent time making very fast; it's much better to use it than try to duplicate all of the necessary functionality on your own (with all the debugging and performance tuning that would require). It wouldn't even be possible to match performance within PHP and that's not counting things you'll miss out on like the zend compiler and cache. The templated systems I've built all use a template which is a PHP script that happens to enjoy a number of predefined functions and variables. To be brutally honest, if the people writing HTML can't handle a list that says "put <?=$Title?> where the page's title should be displayed" they should be sacked for gross incompetence. Unless you've got a really complicated site, building such a list would take a few minutes and it's not necessary for them to learn PHP to copy and paste a few characters.

« previous php.general (#9241) next »