Re: [Phplib-users] PEAR phplibtemplate vs phplib teplate.inc
Brought to you by:
nhruby,
richardarcher
From: Richard A. <rh...@ju...> - 2003-03-21 12:10:02
|
At 9:32 +0100 21/3/03, Bj=F6rn Schotte wrote: >That's partially right. Here's my point of view: Bj=F6rn, I suggest you run some thorough tests on your class to see how it fares in the case of strange input. I notice that these three tests fail in my test script: $t->set_var("tendollars", "$10.00"); $t->set_var("slasha", "\\a"); $t->set_var("brblahbr", "{blah}"); Personally, I think you should either commit to merging PHPLIB template.inc changes into the PEAR version, or else fork the class properly and remove PHPLIB from the class name, leaving only an attribution to the class' ancestry in the comments. I also think you are taking a mighty large liberty by removing the NetUSE copyright notice from the file and re-licensing it under a PHP license, but I guess it is up to Kristian to complain about that, not me. >- some weeks ago I fixed one error in the subst() function that is > currently present in _your_ template.inc: changed the preg_replace call > to str_replace (str_replace is faster here) str_replace only supports arrays as arguments in PHP 4.05 and above. PHPLIB still maintains support for PHP3, at the expense of some speed and access to a few new features (like foreach). I suspect that once you have resolved the $ and \ stripping problems, the speed difference between the two classes will be around 20%. ...Richard. |