Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 3756

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>Get Internet service which corresponds to port and protocol</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.getservbyname.html">getservbyname</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.header-register-callback.html">header_register_callback</a></div>
 <div class="up"><a href="ref.network.html">Network Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.getservbyport" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">getservbyport</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">getservbyport</span> &mdash; <span class="dc-title">Get Internet service which corresponds to port and protocol</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.getservbyport-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>getservbyport</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$protocol</code></span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>getservbyport()</strong></span> returns the Internet service
   associated with <code class="parameter">port</code> for the specified
   <code class="parameter">protocol</code> as per <var class="filename">/etc/services</var>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.getservbyport-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

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

     <dd>

      <p class="para">
       The port number.
      </p>
     </dd>

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

     <dd>

      <p class="para">
       <code class="parameter">protocol</code> is either <em>&quot;tcp&quot;</em>
       or <em>&quot;udp&quot;</em> (in lowercase).
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.getservbyport-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the Internet service name as a string.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.getservbyport-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.getservbyname.html" class="function" rel="rdfs-seeAlso">getservbyname()</a> - Get port number associated with an Internet service and protocol</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.getservbyname.html">getservbyname</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.header-register-callback.html">header_register_callback</a></div>
 <div class="up"><a href="ref.network.html">Network Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>