public static function filterDirtyWords($list, $hidden = "", $str = "")
{
/*
list= the list of the word, must be in simple var like $C_W="fuck,bitch,saddam";
str= is the string to format
spliter is the spliter used to separate each censored word
$hidden = replace censored words by hidden
*/
$hidden_words = $hidden;
# replace the censored word with that
$str = preg_replace('`(^|\\W*)(' . $list . ')s?(\\W|$)`Usi', '$1 ' . $hidden . ' $3', $str);
$str = preg_replace('`(^|\\W*)(' . $list . ')es?(\\W|$)`Usi', '$1 ' . $hidden . ' $3', $str);
return $str;
return $str;
}