PHP getprotobyname() Function

PHP Network Reference : A getprotobyname() example

Definition and Usage

The getprotobyname() function returns the protocol number for a given protocol name.

Syntax

getprotobyname(protocolname)

Parameter Values

Parameter Description
protocolname Required. Specifies a protocol name (like "tcp")

Technical Details

Return Value: The protocol number on success. FALSE on failure.
PHP Version: 4.0+

❮ PHP Network Reference