<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.var.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.get-resource-id.php',
    1 => 'get_resource_id',
    2 => 'Returns an integer identifier for the given resource',
  ),
  'up' => 
  array (
    0 => 'ref.var.php',
    1 => 'Variable handling Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.get-defined-vars.php',
    1 => 'get_defined_vars',
  ),
  'next' => 
  array (
    0 => 'function.get-resource-type.php',
    1 => 'get_resource_type',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/var/functions/get-resource-id.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.get-resource-id" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_resource_id</h1>
  <p class="verinfo">(PHP 8)</p><p class="refpurpose"><span class="refname">get_resource_id</span> &mdash; <span class="dc-title">
   Returns an integer identifier for the given resource
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.get-resource-id-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>get_resource_id</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$resource</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   This function provides a type-safe way for generating the integer identifier
   for a resource.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.get-resource-id-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">resource</code></dt>
     <dd>
      <p class="para">
       The evaluated resource handle.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.get-resource-id-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   The <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> identifier for the given <code class="parameter">resource</code>.
  </p>
  <p class="para">
   This function is essentially an <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> cast of
   <code class="parameter">resource</code> to make it easier to retrieve the resource ID.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.get-resource-id-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>get_resource_id()</strong></span> produces the same result as an <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> cast</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$handle </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"php://stdout"</span><span style="color: #007700">, </span><span style="color: #DD0000">"w"</span><span style="color: #007700">);<br /><br />echo (int) </span><span style="color: #0000BB">$handle </span><span style="color: #007700">. </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />echo </span><span style="color: #0000BB">get_resource_id</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">698
698</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.get-resource-id-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.get-resource-type.php" class="function" rel="rdfs-seeAlso">get_resource_type()</a> - Restituisce il tipo di risorsa</span></li>
   </ul>
  </p>
 </div>

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