getprotobyname()
getprotobyname - Get protocol number associated with protocol name
Syntax
int getprotobyname (
string $name)
Arguments
- name - The protocol name.
Description
getprotobyname() returns the protocol number associated with the protocol name as per /etc/protocols.
Version
PHP 4, 5
Return value
Returns the protocol number or -1 if the protocol is not found.