public static function reduce( string $text, string $chars = ' ' ): string {
    $text = preg_replace( '/[' . $chars . ']{2,}/', ' ', $text );
    return $text;
  }
public static function reduce( string $text, string $chars = ' ' ): string {
    $text = preg_replace( '/[' . $chars . ']{2,}/', ' ', $text );
    return $text;
  }
public static function reduce ( string $ text , string $ chars = ' ' ) : string { $ text = preg_replace ( '/[' . $ chars . ']{2,}/' , ' ' , $ text ) ; return $ text ; }
Clear multiply occurance of chars from text and leave only one

@param string $text
@param string $chars

@return string
Clear multiply occurance of chars from text and leave only one