Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (10 sloc) 234 Bytes
<?php
/**
* @param string $string 文字列
* @param array $keywords
* @return bool
*/
function detect_taboo_words($string, $keywords){
$keywords = implode('|', $keywords);
return preg_match("/($keywords)/imu", $string) > 0;
}