[eluser]Seppo[/eluser]
Just a quick notice about that page (I have never seen it before)
Code:
foreach ($items as $name => $value)
{
if (strpos($str, $name) !== FALSE)
{
str_replace($name, $value, $str);
}
}
does not look optimal, as the guidelines say. If the string is not found, I'm still getting worst results...
And also,
Code:
$str = str_replace(array_keys($items), array_values($items), $str);
is at least two times faster...