Doc #62161 [Opn->Csd]: Incorrect definition of return value for preg_match

From: Date: Mon, 30 Jul 2012 03:39:45 +0000
Subject: Doc #62161 [Opn->Csd]: Incorrect definition of return value for preg_match
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8653@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62161&edit=1 ID: 62161 Updated by: googleguy@php.net Reported by: stiles dot nathan at gmail dot com Summary: Incorrect definition of return value for preg_match -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: N/A PHP Version: Irrelevant -Assigned To: +Assigned To: googleguy 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-07-30 03:37:28] googleguy@php.net Automatic comment from SVN on behalf of googleguy Revision: http://svn.php.net/viewvc/?view=revision&revision=326871 Log: Modified ambiguous wording for return values and added return.falseproblem warning. This fixes Bug #62161 ------------------------------------------------------------------------ [2012-07-30 02:29:12] googleguy@php.net You're right. I can no see no reason why this shouldn't be the documented behavior. preg_match() will only ever return 0, 1, or false. ------------------------------------------------------------------------ [2012-05-25 17:52:37] stiles dot nathan at gmail dot com Description: ------------ My suggested definition of preg_match return value... preg_match returns 1 if a match is found, 0 if no match is found and FALSE if an error occured. And take out the info about preg_match_all as it has little to do with the return value. This function is listed in related so it should be fine. Expected result: ---------------- Simple definition..."preg_match() returns the number of times pattern matches."... this statement is TOTALLY false and misleading. Actual result: -------------- Border line dark pattern. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62161&edit=1

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