Yeti wrote:
I think PHP's string functions are pretty fast and even with large
documents we are talking about a couple of extra microseconds on a
modern machine. I once saw someone do pretty much the same as you are
trying to do with strtr() [1], but I don't know if that function is
faster than s
str_replace will take arrays for "before" and "after" sequences.
So, build arrays, and do ONE str_replace and Bob's your uncle.
Another option, a bit crude, but effective, would be to wrap your template-y
bit in a function that calls 'extract' on an array of variable names.
class Templat
> What would you do?
I think PHP's string functions are pretty fast and even with large
documents we are talking about a couple of extra microseconds on a
modern machine. I once saw someone do pretty much the same as you are
trying to do with strtr() [1], but I don't know if that function is
faste
Hey guys,
So, I was working on my framework today, and noticed unfortunately that
PHP does not allow using the magic method __get for static variables.
There is a patch available, but I'm not sure how long it will be before
it makes it into the stable PHP release.
Anyway, my question is abou
4 matches
Mail list logo