mattsoftnet
New Member
I want to squeeze out every bit of preformance out of the template system I'm making in php. what would give me better preformance, always using preg_replace and other regular expression functions, or using preg_replace when needed, but str_replace when I don't need the extra regular expression power? I did some simple tests just now and found some unexpected results. I found preg_replace actually runs a bit faster then str_replace when they're both doing just a simple 1 char string replace. what do you think?