mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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:
parent
5ad5bd9009
commit
9d7a3fff18
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue