#44765 [Opn->Bgs]: Wrong return type

From: Date: Thu, 17 Apr 2008 19:12:47 +0000
Subject: #44765 [Opn->Bgs]: Wrong return type
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-722@lists.php.net to get a copy of this message
ID: 44765 Updated by: colder@php.net Reported By: php at htmlland dot net -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: N/A PHP Version: Irrelevant New Comment: We don't document types returned in case of errors or function misuses, so "int" is fine here. As for the == vs. === distinction, it doesn't make much sense here as 0 and false don't have radically different meanings nor would lead to false negatives. In case of error, a warning is issued anyway. Previous Comments: ------------------------------------------------------------------------ [2008-04-17 18:51:50] php at htmlland dot net Description: ------------ The return value found in the description section on the documentation pages for preg_match and preg_match_all say int but then the "Return Values" box sates on-error FALSE will be returned. The type needs to be changed to mixed and a warning box shown describing the diffrence between == and ===. See the documentation for array_search (the return values section). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44765&edit=1

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