#49673 [Opn->Bgs]: preg_match_all returns false when third arument is omitted
| From: | jani@php.net | Date: | Fri, 25 Sep 2009 21:49:33 +0000 |
| Subject: | #49673 [Opn->Bgs]: preg_match_all returns false when third arument is omitted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142899@lists.php.net to get a copy of this message | ||
ID: 49673
Updated by: jani@php.net
Reported By: mfthemon at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: PCRE related
Operating System: win2k7server
PHP Version: 5.3.0
New Comment:
RTFM: "Returns the number of full pattern matches (which might be
zero),
or FALSE if an error occurred."
And might the error perhaps be that the 3rd parameter is NOT optional?
:)
Previous Comments:
------------------------------------------------------------------------
[2009-09-25 19:22:46] mfthemon at gmail dot com
Description:
------------
preg_match_all doesn't return matches count when the third argument is
omitted.
Reproduce code:
---------------
var_dump(preg_match_all('/b\([\w\W]*?\)/',
'b(2)b(4)b(5)b(8)b(2)b(18)'));
Expected result:
----------------
int(6)
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49673&edit=1