public static function Filter($text) { if (empty($text)) { return $text; } if (!self::$replaces) { self::$replaces = array_combine(self::$badword, array_fill(0, count(self::$badword), '*')); } return self::strtr_array($text, self::$replaces); }