preg_match_all('/.../i', $string, $words); // This has no impact at all. //$words = array_unique(words); echo count($words[0]); // This returns a high number, as expected. It's 97 currently, but should be 4.