protected function punycode($str) { if (function_exists('idn_to_ascii')) { return idn_to_ascii($str); } else { return $str; } }