array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.getservbyport.php', 1 => 'getservbyport', ), 'up' => array ( 0 => 'ref.network.php', 1 => 'Network Functions', ), 'prev' => array ( 0 => 'function.getservbyname.php', 1 => 'getservbyname', ), 'next' => array ( 0 => 'function.header-register-callback.php', 1 => 'header_register_callback', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/network/functions/getservbyport.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
getservbyport — Get Internet service which corresponds to port and protocol
getservbyport() returns the Internet service
associated with port
for the specified
protocol
as per /etc/services.
port
The port number.
protocol
protocol
is either "tcp"
or "udp"
(in lowercase).
Returns the Internet service name as a string, or false
on failure.