PhpRiot
Follow phpriot on Twitter
Sponsored Link
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

idn_to_utf8

(PHP 5 >= 5.3.0, PECL intl >= 1.0.2, PECL idn >= 0.1)

idn_to_utf8Convert domain name from IDNA ASCII to Unicode.

Description

Procedural style

string idn_to_utf8 ( string $domain [, int $options ] )

This function converts Unicode domain name from IDNA ASCII-compatible format to plain Unicode.

Parameters

domain

Domain to convert in IDNA ASCII-compatible format.

options

Conversion options - combination of IDNA_* constants.

Return Values

Domain name in Unicode. In PHP 5, domain name will be in UTF-8. or FALSE on failure

Examples

Example #1 idn_to_utf8() example

<?php

echo idn_to_utf8('xn--tst-qla.de'); 

?>

The above example will output:

täst.de

See Also

PHP Manual