Doc #60781 [Opn->Csd]: getprotobyname: returns FALSE, not -1

From: Date: Fri, 20 Jan 2012 02:19:51 +0000
Subject: Doc #60781 [Opn->Csd]: getprotobyname: returns FALSE, not -1
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7796@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60781&edit=1 ID: 60781 Updated by: laruence@php.net Reported by: phpmpan at mpan dot pl Summary: getprotobyname: returns FALSE, not -1 -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: * PHP Version: Irrelevant -Assigned To: +Assigned To: laruence Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2012-01-18 02:39:46] laruence at gmail dot com this was introduced since 2002.. http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/basic_functions.c? view=log&pathrev=98153 ------------------------------------------------------------------------ [2012-01-17 15:54:07] phpmpan at mpan dot pl Description: ------------ --- From manual page: http://www.php.net/function.getprotobyname#refsect1-function.getprotobyname-returnvalues --- Documentation says "-1 if the protocol is not found", but function returns FALSE if the protocol is not found. Related to bug#60779 and similar bug#52662 for getprotobynumber. Test script: --------------- <?php // Based on code from #60779 $protocol = 'BLA'; $get_prot = getprotobyname($protocol); var_dump($get_prot); ?> Expected result: ---------------- Return Values Returns the protocol number or FALSE if the protocol is not found. Actual result: -------------- Return Values Returns the protocol number or -1 if the protocol is not found. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60781&edit=1

« previous php.doc.bugs (#7796) next »