public static function charAscii($char)
    {
        if (self::isAscii($char)) {
            return $char;
        }
        $char = htmlentities($char);
        return $char;
    }
public static function charAscii($char)
    {
        if (self::isAscii($char)) {
            return $char;
        }
        $char = htmlentities($char);
        return $char;
    }
public static function charAscii ( $ char ) { if ( self :: isAscii ( $ char ) ) { return $ char ; } $ char = htmlentities ( $ char ) ; return $ char ; }
Returns the ASCII equivalent of a character

@param string $char The character to test
@return string The ASCII valid character
Returns the ASCII equivalent of a character