Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 3576

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Convert domain name from IDNA ASCII to Unicode.</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.idn-to-unicode.html">idn_to_unicode</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.intlexception.html">IntlException</a></div>
 <div class="up"><a href="ref.intl.idn.html">IDN Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><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, 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">Convert domain name from IDNA ASCII to Unicode.</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.idn-to-utf8-description">
  <h3 class="title">Description</h3>
  <p class="para">Procedural style</p>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>idn_to_utf8</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$domain</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$variant</code><span class="initializer"> = INTL_IDNA_VARIANT_2003</span></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$idna_info</code></span>
  ]]] )</div>

  <p class="para rdfs-comment">
   This function converts Unicode domain name from IDNA ASCII-compatible format to plain Unicode, encoded in UTF-8.
  </p> 
  </div>


 <div class="refsect1 parameters" id="refsect1-function.idn-to-utf8-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">domain</code></em></span>
     <dd>

      <p class="para">
       Domain to convert in IDNA ASCII-compatible format.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">options</code></em></span>
     <dd>

      <p class="para">
       Conversion options - combination of IDNA_* constants
       (except IDNA_ERROR_* constants).
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">variant</code></em></span>
     <dd>

      <p class="para">
       Either <strong><code>INTL_IDNA_VARIANT_2003</code></strong> for IDNA 2003 or
       <strong><code>INTL_IDNA_VARIANT_UTS46</code></strong> for UTS #46.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">idna_info</code></em></span>
     <dd>

      <p class="para">
       This parameter can be used only if
       <strong><code>INTL_IDNA_VARIANT_UTS46</code></strong> was used for
       <em><code class="parameter">variant</code></em>. In that case, it will be filled with an
       array with the keys <em>&#039;result&#039;</em>, the possibly illegal
       result of the transformation,
       <em>&#039;isTransitionalDifferent&#039;</em>, a boolean indicating
       whether the usage of the transitional mechanisms of UTS #46 either has
       or would have changed the result and <em>&#039;errors&#039;</em>,
       which is an <span class="type"><a href="language.types.integer.html" class="type int">int</a></span> representing a bitset of the error
       constants IDNA_ERROR_*.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.idn-to-utf8-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Domain name in Unicode, encoded in UTF-8.  or <strong><code>FALSE</code></strong> on failure
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.idn-to-utf8-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.4.0/PECL 2.0.0b1</td>
       <td>
        Added the parameters <em><code class="parameter">variant</code></em> and
        <em><code class="parameter">idna_info</code></em>; UTS #46 support.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.idn-to-utf8-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-2688">
   <p><strong>Example #1  <span class="function"><strong>idn_to_utf8()</strong></span> example</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&nbsp;</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">);&nbsp;<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
  <p class="para">The above example will output:</p>
  <div class="example-contents screen">
<div class="cdata"><pre>
täst.de
</pre></div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.idn-to-utf8-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.idn-to-unicode.html" class="function" rel="rdfs-seeAlso">idn_to_unicode()</a> - Alias of idn_to_utf8</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.idn-to-unicode.html">idn_to_unicode</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.intlexception.html">IntlException</a></div>
 <div class="up"><a href="ref.intl.idn.html">IDN Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>