<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'uri-whatwg-url.withport.php',
    1 => 'Uri\\WhatWg\\Url::withPort',
    2 => 'Modifica el componente de puerto',
  ),
  'up' => 
  array (
    0 => 'class.uri-whatwg-url.php',
    1 => 'Uri\\WhatWg\\Url',
  ),
  'prev' => 
  array (
    0 => 'uri-whatwg-url.withpath.php',
    1 => 'Uri\\WhatWg\\Url::withPath',
  ),
  'next' => 
  array (
    0 => 'uri-whatwg-url.withquery.php',
    1 => 'Uri\\WhatWg\\Url::withQuery',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/uri/uri/whatwg/url/withport.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="uri-whatwg-url.withport" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Uri\WhatWg\Url::withPort</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.5.0)</p><p class="refpurpose"><span class="refname">Uri\WhatWg\Url::withPort</span> &mdash; <span class="dc-title">Modifica el componente de puerto</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-uri-whatwg-url.withport-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Uri\WhatWg\Url::withPort</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$port</code></span>): <span class="type">static</span></div>

  <p class="simpara">
   Crea una nueva URL y modifica su componente de puerto.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-uri-whatwg-url.withport-parameters">
  <h3 class="title">Parámetros</h3>
  <dl>
   
    <dt><code class="parameter">port</code></dt>
    <dd>
     <span class="simpara">
      Nuevo componente de puerto.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-uri-whatwg-url.withport-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="simpara">
   La instancia de <span class="classname"><a href="class.uri-whatwg-url.php" class="classname">Uri\WhatWg\Url</a></span> modificada.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-uri-whatwg-url.withport-errors">
  <h3 class="title">Errores/Excepciones</h3>
  
  <p class="simpara">
   Si la URL resultante es inválida, se lanza una excepción <span class="exceptionname"><a href="class.uri-whatwg-invalidurlexception.php" class="exceptionname">Uri\WhatWg\InvalidUrlException</a></span>.
  </p>
 
 </div>


 <div class="refsect1 examples" id="refsect1-uri-whatwg-url.withport-examples">
  <h3 class="title">Ejemplos</h3>
  <div class="example" id="uri-whatwg-url.withport.example.basic">
   <p><strong>Ejemplo #1 Ejemplo básico de <span class="methodname"><strong>Uri\WhatWg\Url::withPort()</strong></span></strong></p>
   <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$url </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:8080"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$url </span><span style="color: #007700">= </span><span style="color: #0000BB">$url</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">withPort</span><span style="color: #007700">(</span><span style="color: #0000BB">443</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #0000BB">$url</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getPort</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>El ejemplo anterior mostrará:</p></div>
   <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">443</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-uri-whatwg-url.withport-seealso">
  <h3 class="title">Ver también</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="uri-whatwg-url.getport.php" class="methodname" rel="rdfs-seeAlso">Uri\WhatWg\Url::getPort()</a> - Recupera el componente de puerto</span></li>
   <li><span class="methodname"><a href="uri-rfc3986-uri.withport.php" class="methodname" rel="rdfs-seeAlso">Uri\Rfc3986\Uri::withPort()</a> - Modifica el componente de puerto</span></li>
  </ul>
 </div>

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