getprotobyname function

getprotobyname function returns the number associated with a protocol.

<?php
print("TCP is protocol " . getprotobyname('tcp') . "<br>\n");
?>