<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.uri-whatwg-url.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'uri-whatwg-url.equals.php',
    1 => 'Uri\\WhatWg\\Url::equals',
    2 => 'Check if two URLs are equivalent',
  ),
  'up' => 
  array (
    0 => 'class.uri-whatwg-url.php',
    1 => 'Uri\\WhatWg\\Url',
  ),
  'prev' => 
  array (
    0 => 'uri-whatwg-url.debuginfo.php',
    1 => 'Uri\\WhatWg\\Url::__debugInfo',
  ),
  'next' => 
  array (
    0 => 'uri-whatwg-url.getasciihost.php',
    1 => 'Uri\\WhatWg\\Url::getAsciiHost',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/uri/uri/whatwg/url/equals.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="uri-whatwg-url.equals" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Uri\WhatWg\Url::equals</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.5.0)</p><p class="refpurpose"><span class="refname">Uri\WhatWg\Url::equals</span> &mdash; <span class="dc-title">Check if two URLs are equivalent</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-uri-whatwg-url.equals-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Uri\WhatWg\Url::equals</strong></span>(<span class="methodparam"><span class="type"><a href="class.uri-whatwg-url.php" class="type Uri\WhatWg\Url">Uri\WhatWg\Url</a></span> <code class="parameter">$url</code></span>, <span class="methodparam"><span class="type"><a href="enum.uri-uricomparisonmode.php" class="type Uri\UriComparisonMode">Uri\UriComparisonMode</a></span> <code class="parameter">$comparisonMode</code><span class="initializer"> = <strong><code>Uri\UriComparisonMode::ExcludeFragment</code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Checks if two URLs are equivalent.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-uri-whatwg-url.equals-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">url</code></dt>
    <dd>
     <span class="simpara">
      URL to compare the current URL against.
     </span>
    </dd>
   
   
    <dt><code class="parameter">comparisonMode</code></dt>
    <dd>
     <span class="simpara">
      Whether the fragment component is taken into account of the comparison
      (<code class="literal">Uri\UriComparisonMode::IncludeFragment</code>) or not
      (<code class="literal">Uri\UriComparisonMode::ExcludeFragment</code>). By default, the fragment is excluded.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-uri-whatwg-url.equals-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the two URLs are equivalent, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-uri-whatwg-url.equals-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="uri-whatwg-url.equals.example.basic">
   <p><strong>Beispiel #1 <span class="methodname"><strong>Uri\WhatWg\Url::equals()</strong></span> basic example</strong></p>
   <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$url1 </span><span style="color: #007700">= new </span><span style="color: #0000BB">\Uri\WhatWg\Url</span><span style="color: #007700">(</span><span style="color: #DD0000">"https://example.com"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$url2 </span><span style="color: #007700">= new </span><span style="color: #0000BB">\Uri\WhatWg\Url</span><span style="color: #007700">(</span><span style="color: #DD0000">"HTTPS://example.com"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$url1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">equals</span><span style="color: #007700">(</span><span style="color: #0000BB">$url2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
   <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">bool(true)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-uri-whatwg-url.equals-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="uri-rfc3986-uri.equals.php" class="methodname" rel="rdfs-seeAlso">Uri\Rfc3986\Uri::equals()</a> - Check if two URIs are equivalent</span></li>
  </ul>
 </div>

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