示例#1
0
 /**
  * 將多餘自元過濾後進行比對,且第一個字串不得為空,
  * 符合以上兩個條件才會傳回true
  * 
  * @param  string $str1       
  * @param  string $str2       
  * @param  array  $placeholder
  * @return boolean
  */
 protected static function strictCompare($str1, $str2, $placeholder = [''])
 {
     return !empty(str_replace(getReplaceWords(), $placeholder, $str1)) && str_replace(getReplaceWords(), $placeholder, $str1) === str_replace(getReplaceWords(), $placeholder, $str2);
 }
示例#2
0
function srp($str, $placeholder = [])
{
    return str_replace(getReplaceWords(), $placeholder, $str);
}