Menu Home

getprotobyname

osbo.com | PHP | Functions | 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

<?

$name = 'tcp';

$return = getprotobyname($name);
echo $return;

?>
6

PHP