Fixed bug #60781 (getprotobyname: returns FALSE, not -1)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322431 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xinchen Hui 2012-01-18 02:46:50 +00:00
parent 5ad5bd9009
commit 9d7a3fff18

View file

@ -38,7 +38,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the protocol number or -1 if the protocol is not found.
Returns the protocol number, &return.falseforfailure;.
</para>
</refsect1>
@ -52,7 +52,7 @@
<?php
$protocol = 'tcp';
$get_prot = getprotobyname($protocol);
if ($get_prot == -1) {
if ($get_prot === FALSE) {
echo 'Invalid Protocol';
} else {
echo 'Protocol #' . $get_prot;