Doc #65792 [Opn->Wfx]: Incomplete return values

From: Date: Tue, 01 Oct 2013 17:26:37 +0000
Subject: Doc #65792 [Opn->Wfx]: Incomplete return values
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10344@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65792&edit=1 ID: 65792 Updated by: aharvey@php.net Reported by: chris at unix-ninja dot com Summary: Incomplete return values -Status: Open +Status: Wont fix Type: Documentation Problem Package: Documentation problem PHP Version: 5.5.4 Block user comment: N Private report: N New Comment: This is documented at http://php.net/manual/en/functions.internal.php — it's been previously decided not to include this on each function page. Previous Comments: ------------------------------------------------------------------------ [2013-09-30 20:18:29] chris at unix-ninja dot com Description: ------------ --- From manual page: http://www.php.net/function.strcmp#refsect1-function.strcmp- returnvalues --- The documentation does not specify that strcmp() returns NULL on error. This is important as it could be incorrectly evaluated as a successful result if using simple evaluation. For completeness, the return value of NULL on error should be mentioned in the documentation. Test script: --------------- @ $ans == strcmp(array(), $string); $ans now equals a successful hit. (which is wrong, but expected behaviour) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65792&edit=1

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