Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 1841

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Determines whether an object is equal to the current instance</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.ds-hashable.html">Hashable</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ds-hashable.hash.html">Ds\Hashable::hash</a></div>
 <div class="up"><a href="class.ds-hashable.html">Hashable</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="ds-hashable.equals" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Ds\Hashable::equals</h1>
  <p class="verinfo">(PECL ds &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Ds\Hashable::equals</span> &mdash; <span class="dc-title">Determines whether an object is equal to the current instance</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-ds-hashable.equals-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>Ds\Hashable::equals</strong></span>
    ( <span class="methodparam"><span class="type">object</span> <code class="parameter">$obj</code></span>
   )</div>

  <p class="para rdfs-comment">
    Determines whether another object is equal to the current instance.
  </p>

  <p class="para">
    This method allows objects to be used as keys in structures such as
    <strong class="classname">Ds\Map</strong> and <strong class="classname">Ds\Set</strong>, or any
    other lookup structure that honors this interface.
  </p>

  <blockquote class="note"><p><strong class="note">Note</strong>: 
    <p class="para">
        It&#039;s guaranteed that <code class="parameter">obj</code> is an instance of the same class.
    </p>
  </p></blockquote>

  <div class="caution"><strong class="caution">Caution</strong>
    <p class="para">
        It&#039;s important that objects which are equal also have the same hash value.
        See <span class="function"><a href="ds-hashable.hash.html" class="function">Ds\Hashable::hash()</a></span>.
    </p>
  </div>

 </div>


 <div class="refsect1 parameters" id="refsect1-ds-hashable.equals-parameters">
  <h3 class="title">Parameters</h3>
  <dl>

   
    <dt>
<code class="parameter">obj</code></dt>

    <dd>

     <p class="para">
        The object to compare the current instance to, which is always an instance of
        the same class.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-ds-hashable.equals-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
    <strong><code>TRUE</code></strong> if equal, <strong><code>FALSE</code></strong> otherwise.
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.ds-hashable.html">Hashable</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ds-hashable.hash.html">Ds\Hashable::hash</a></div>
 <div class="up"><a href="class.ds-hashable.html">Hashable</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>