<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.intl.idn.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.idn-to-utf8.php',
    1 => 'idn_to_utf8',
    2 => 'IDNAのASCII方式でエンコードされたドメイン名をUnicodeに変換する',
  ),
  'up' => 
  array (
    0 => 'ref.intl.idn.php',
    1 => 'IDN 関数',
  ),
  'prev' => 
  array (
    0 => 'function.idn-to-ascii.php',
    1 => 'idn_to_ascii',
  ),
  'next' => 
  array (
    0 => 'class.intlchar.php',
    1 => 'IntlChar',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/intl/idn/idn-to-utf8.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.idn-to-utf8" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">idn_to_utf8</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL intl &gt;= 1.0.2, PECL idn &gt;= 0.1)</p><p class="refpurpose"><span class="refname">idn_to_utf8</span> &mdash; <span class="dc-title">IDNAのASCII方式でエンコードされたドメイン名をUnicodeに変換する</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.idn-to-utf8-description">
  <h3 class="title">説明</h3>
  <p class="para">手続き型</p>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>idn_to_utf8</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$domain</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = <strong><code><a href="intl.constants.php#constant.idna-default">IDNA_DEFAULT</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$variant</code><span class="initializer"> = <strong><code><a href="intl.constants.php#constant.intl-idna-variant-uts46">INTL_IDNA_VARIANT_UTS46</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter reference">&$idna_info</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span><br>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   IDNAのASCII方式でエンコードされたドメイン名をUTF-8でエンコードされたUnicodeに変換します。
  </p> 
  </div>


 <div class="refsect1 parameters" id="refsect1-function.idn-to-utf8-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">domain</code></dt>
     <dd>
      <p class="para">
       IDNAのASCII方式でエンコードされた、変換対象のドメイン名
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       変換オプション - IDNA_ ではじまる定数
       (IDNA_ERROR_* 定数を除く) の組み合わせです
      </p>
     </dd>
    
    
     <dt><code class="parameter">variant</code></dt>
     <dd>
      <p class="para">
       IDNA 2003 の場合は <strong><code><a href="intl.constants.php#constant.intl-idna-variant-2003">INTL_IDNA_VARIANT_2003</a></code></strong> (PHP 7.2.0 以降は非推奨)、あるいは
       UTS #46 の場合は <strong><code><a href="intl.constants.php#constant.intl-idna-variant-uts46">INTL_IDNA_VARIANT_UTS46</a></code></strong> (ICU 4.6 以降のみ利用可能)。
      </p>
     </dd>
    
    
     <dt><code class="parameter">idna_info</code></dt>
     <dd>
      <p class="para">
       このパラメータを使うのは、<code class="parameter">variant</code> が
       <strong><code><a href="intl.constants.php#constant.intl-idna-variant-uts46">INTL_IDNA_VARIANT_UTS46</a></code></strong> の場合だけです。
       このとき、このパラメータには <code class="literal">&#039;result&#039;</code>、
       <code class="literal">&#039;isTransitionalDifferent&#039;</code>、そして
       <code class="literal">&#039;errors&#039;</code> の三つのキーを含む配列が入ります。
       <code class="literal">&#039;result&#039;</code> にはおそらく不正だと考えられる変換結果、
       <code class="literal">&#039;isTransitionalDifferent&#039;</code> には
       UTS #46 の非移行的な機能を使って結果を変更したかどうかをあらわす boolean 値、そして
       <code class="literal">&#039;errors&#039;</code> はエラー定数 IDNA_ERROR_*
       のビットセットを表します。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.idn-to-utf8-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   Unicodeのドメイン名。UTF-8 にエンコードされています。失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.idn-to-utf8-changelog">
  <h3 class="title">変更履歴</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>バージョン</th>
       <th>説明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>7.4.0</td>
       <td>
        <code class="parameter">variant</code> のデフォルト値が
        <strong><code><a href="intl.constants.php#constant.intl-idna-variant-uts46">INTL_IDNA_VARIANT_UTS46</a></code></strong> となり、
        その代わりに <strong><code><a href="intl.constants.php#constant.intl-idna-variant-2003">INTL_IDNA_VARIANT_2003</a></code></strong> は非推奨となりました。
       </td>
      </tr>

      <tr>
       <td>7.2.0</td>
       <td>
        <strong><code><a href="intl.constants.php#constant.intl-idna-variant-2003">INTL_IDNA_VARIANT_2003</a></code></strong> は非推奨です。代わりに
        <strong><code><a href="intl.constants.php#constant.intl-idna-variant-uts46">INTL_IDNA_VARIANT_UTS46</a></code></strong> を使用してください。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.idn-to-utf8-examples">
  <h3 class="title">例</h3>
  <div class="example" id="example-1">
   <p><strong>例1 <span class="function"><strong>idn_to_utf8()</strong></span> の例</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">idn_to_utf8</span><span style="color: #007700">(</span><span style="color: #DD0000">'xn--tst-qla.de'</span><span style="color: #007700">); <br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
  <p class="para">上の例の出力は以下となります。</p>
  <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">tast.de</pre>
</div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.idn-to-utf8-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.idn-to-ascii.php" class="function" rel="rdfs-seeAlso">idn_to_ascii()</a> - ドメイン名をIDNAのASCII形式に変換する</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>