<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionreference.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'reflectionreference.getid.php',
    1 => 'ReflectionReference::getId',
    2 => 'Get unique ID of a reference',
  ),
  'up' => 
  array (
    0 => 'class.reflectionreference.php',
    1 => 'ReflectionReference',
  ),
  'prev' => 
  array (
    0 => 'reflectionreference.fromarrayelement.php',
    1 => 'ReflectionReference::fromArrayElement',
  ),
  'next' => 
  array (
    0 => 'class.reflectionattribute.php',
    1 => 'ReflectionAttribute',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionreference/getid.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionreference.getid" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionReference::getId</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.4.0, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionReference::getId</span> &mdash; <span class="dc-title">Get unique ID of a reference</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionreference.getid-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionReference::getId</strong></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Returns an ID which is unique for the reference for the lifetime of that reference.
   This ID can be used to compare references for equality, or to maintain a map of
   known references.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionreference.getid-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">У цієї функції немає
параметрів.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionreference.getid-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns a <span class="type"><a href="language.types.string.php" class="type string">string</a></span> of unspecified format.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionreference.getid-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="reflectionreference.getid.example.basic">
   <p><strong>Приклад #1 Basic <span class="methodname"><strong>ReflectionReference::getId()</strong></span> usage</strong></p>
   <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$val1 </span><span style="color: #007700">= </span><span style="color: #DD0000">'foo'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$val2 </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$arr </span><span style="color: #007700">= [&amp;</span><span style="color: #0000BB">$val1</span><span style="color: #007700">, &amp;</span><span style="color: #0000BB">$val2</span><span style="color: #007700">, &amp;</span><span style="color: #0000BB">$val1</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">$rr1 </span><span style="color: #007700">= </span><span style="color: #0000BB">ReflectionReference</span><span style="color: #007700">::</span><span style="color: #0000BB">fromArrayElement</span><span style="color: #007700">(</span><span style="color: #0000BB">$arr</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$rr2 </span><span style="color: #007700">= </span><span style="color: #0000BB">ReflectionReference</span><span style="color: #007700">::</span><span style="color: #0000BB">fromArrayElement</span><span style="color: #007700">(</span><span style="color: #0000BB">$arr</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$rr3 </span><span style="color: #007700">= </span><span style="color: #0000BB">ReflectionReference</span><span style="color: #007700">::</span><span style="color: #0000BB">fromArrayElement</span><span style="color: #007700">(</span><span style="color: #0000BB">$arr</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$rr1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getId</span><span style="color: #007700">() === </span><span style="color: #0000BB">$rr2</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getId</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$rr1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getId</span><span style="color: #007700">() === </span><span style="color: #0000BB">$rr3</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getId</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад
виведе:</p></div>
   <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">bool(false)
bool(true)</pre>
</div>
   </div>
  </div>
 </div>


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