Solo te dije la diferencia entre una y la otra, no te dije que no iba a funcionar para tu caso, ¿acaso intentaste?
Código php:
Ver originalfunction highlight_text($text, $word) {
$text = str_ireplace($word, "<span class=\"highlight\">$word</span>", $text); return $text;
}