public static function ascii($str, $srcEncoding = 'UTF-8')
    {
        // collapse soft hyphens.
        $str = str_replace(html_entity_decode('&shy;', null, 'UTF-8'), '', $str);
        return transliterator_transliterate('Any-Latin;Latin-ASCII', $str);
    }
public static function ascii($str, $srcEncoding = 'UTF-8')
    {
        // collapse soft hyphens.
        $str = str_replace(html_entity_decode('&shy;', null, 'UTF-8'), '', $str);
        return transliterator_transliterate('Any-Latin;Latin-ASCII', $str);
    }
public static function ascii ( $ str , $ srcEncoding = 'UTF-8' ) { // collapse soft hyphens. $ str = str_replace ( html_entity_decode ( '&shy;' , null , 'UTF-8' ) , '' , $ str ) ; return transliterator_transliterate ( 'Any-Latin;Latin-ASCII' , $ str ) ; }
Converts a text string to ASCII

@param string $str
@param string $srcEncoding
@return string
Converts a text string to ASCII