Online Shopping : Computers : Programming : Languages : PHP : Common Problems : Templates

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

74 of 82 people (90%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

I need to build a template-based PHP solution. Which one is a better choice to start from: FastTemplate or the functions in PHPLib?

May 5th, 2000 11:51
toby cabot, Thompson Marzagao, Nathan Wallace,


I prefer phplib.  First, if all other things are equal, then I'd prefer
phplib simply because it's one fewer component to install, track, learn,
etc.

The biggest issue for me is that phplib templates will almost always be
faster than fasttemplates.  The reason is obvious from looking at the
source to the respective parse() routines:  phplib does one regular
expression search and replace, and fasttemplates spins in a loop and
does one replacement for each replacement variable.  This can be a 30%
difference or it can be a 250% difference but phplib will always come
out ahead.

Other than that they appear to be similar.  If you check the phplib
developer's mailing list for April 2000 there are some comments about
just this question, too.