PHP getprotobynumber() Function

❮ PHP Network Reference

Example

A getprotobynumber() example:

<?php
$protocolname = getprotobynumber(6);
echo $protocolname;
?>


Definition and Usage

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

Syntax

getprotobynumber(protocolnumber)

Parameter Values

Parameter Description
protocolnumber Required. Specifies a protocol number (like 17)

Technical Details

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

❮ PHP Network Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.