<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.spl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.spl-object-id.php',
    1 => 'spl_object_id',
    2 => 'Return the integer object handle for given object',
  ),
  'up' => 
  array (
    0 => 'ref.spl.php',
    1 => 'SPL Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.spl-object-hash.php',
    1 => 'spl_object_hash',
  ),
  'next' => 
  array (
    0 => 'book.stream.php',
    1 => 'Streams',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/functions/spl-object-id.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.spl-object-id" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">spl_object_id</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0, PHP 8)</p><p class="refpurpose"><span class="refname">spl_object_id</span> &mdash; <span class="dc-title">
   Return the integer object handle for given object
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.spl-object-id-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>spl_object_id</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.object.php" class="type object">object</a></span> <code class="parameter">$object</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 returns a unique identifier for the object. The object id is
   unique for the lifetime of the object. Once the object is destroyed, its id
   may be reused for other objects. This behavior is similar to
   <span class="function"><a href="function.spl-object-hash.php" class="function">spl_object_hash()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.spl-object-id-parameters">
   <h3 class="title">Elenco dei parametri</h3>
   <p class="para">
    <dl>
     
      <dt><code class="parameter">object</code></dt>
      <dd>
       <p class="para">
        Any object. 
       </p>
      </dd>
     
    </dl>
   </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.spl-object-id-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   An integer identifier that is unique for each currently existing object and
   is always the same for each object.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.spl-object-id-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 A <span class="function"><strong>spl_object_id()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$id </span><span style="color: #007700">= </span><span style="color: #0000BB">spl_object_id</span><span style="color: #007700">(</span><span style="color: #0000BB">$object</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$storage</span><span style="color: #007700">[</span><span style="color: #0000BB">$id</span><span style="color: #007700">] = </span><span style="color: #0000BB">$object</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.spl-object-id-notes">
  <h3 class="title">Note</h3>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    When an object is destroyed, its id may be reused for other objects.
   </p>
  </p></blockquote>
 </div>
 
</div><?php manual_footer($setup); ?>