getprotobyname

Get protocol number associated with protocol name

Syntax

getprotobyname ( string $name ) : int

Parameters

name

The protocol name.

Return

Returns the protocol number, or FALSE on failure.

Examples

1

<?

$name = 'tcp';

$return = getprotobyname($name);

echo $return;

?>
6
HomeMenu