<?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 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'function.long2ip.php',
    1 => 'long2ip',
    2 => 'Converte um endere&ccedil;o inteiro longo em uma string no formato padr&atilde;o com pontos da Internet (IPv4)',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Fun&ccedil;&otilde;es de Network',
  ),
  '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' => 'pt_BR',
    '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">Converte um endereço inteiro longo em uma string no formato padrão com pontos da Internet (IPv4)</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.long2ip-description">
  <h3 class="title">Descrição</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">
   A função <span class="function"><strong>long2ip()</strong></span> gera um endereço de Internet em
   formato com pontos (ou seja: aaa.bbb.ccc.ddd) a partir da representação
   de inteiro longo.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.long2ip-parameters">
  <h3 class="title">Parâmetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">ip</code></dt>
     <dd>
      <p class="para">
       Uma representação de endereço adequada em número inteiro longo.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.long2ip-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="para">
   Retorna o endereço IP da Internet como uma <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.long2ip-changelog">
  <h3 class="title">Registro de Alterações</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versão</th>
      <th>Descrição</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       O tipo do retorno foi alterado de <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> para <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
      </td>
     </tr>

     <tr>
      <td>7.1.0</td>
      <td>
       O tipo do parâmetro <code class="parameter">ip</code> foi
       alterado de <span class="type"><a href="language.types.string.php" class="type string">string</a></span> para <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">Notas</h3>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    Em arquiteturas de 32 bits, converter representações inteiras de endereços IP
    de <span class="type"><a href="language.types.string.php" class="type string">string</a></span> para <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> não fornecerá
    resultados corretos para números que excedam <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">Veja Também</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ip2long.php" class="function" rel="rdfs-seeAlso">ip2long()</a> - Converte uma string contendo um endere&ccedil;o com pontos do protocolo da Internet (IPv4) em um n&uacute;mero inteiro longo</span></li>
   </ul>
  </p>
 </div>


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