<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.network.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.long2ip.php',
    1 => 'long2ip',
    2 => '将长整型转化为字符串形式带点的互联网标准格式地址（IPV4）',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => '网络 函数',
  ),
  'prev' => 
  array (
    0 => 'function.ip2long.php',
    1 => 'ip2long',
  ),
  'next' => 
  array (
    0 => 'function.net-get-interfaces.php',
    1 => 'net_get_interfaces',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/network/functions/long2ip.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.long2ip" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">long2ip</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">long2ip</span> &mdash; <span class="dc-title">将长整型转化为字符串形式带点的互联网标准格式地址（IPV4）</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.long2ip-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>long2ip</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$ip</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>long2ip()</strong></span> 函数通过长整型的表达形式转化生成带点格式的互联网地址（例如：aaa.bbb.ccc.ddd ）。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.long2ip-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">ip</code></dt>
     <dd>
      <p class="para">
       合格的地址，长整型的表达形式。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.long2ip-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   以 <span class="type"><a href="language.types.string.php" class="type string">string</a></span> 的形式返互联网 IP 地址。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.long2ip-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       返回类型从 <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> 改为 <span class="type"><a href="language.types.string.php" class="type string">string</a></span>。
      </td>
     </tr>

     <tr>
      <td>7.1.0</td>
      <td>
       参数 <code class="parameter">ip</code> 的类型从 <span class="type"><a href="language.types.string.php" class="type string">string</a></span> 改成 <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 notes" id="refsect1-function.long2ip-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    在 32 位架构中，从 <span class="type"><a href="language.types.string.php" class="type string">string</a></span> 转换 <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> 整型形式的 ip 地址将有可能导致错误的结果，因为结果数字超出了 <strong><code><a href="reserved.constants.php#constant.php-int-max">PHP_INT_MAX</a></code></strong> 限制。
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.long2ip-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ip2long.php" class="function" rel="rdfs-seeAlso">ip2long()</a> - 将 IPV4 的字符串互联网协议转换成长整型数字</span></li>
   </ul>
  </p>
 </div>


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