Bug #62677 [Opn]: preg_match_all: Useless without optional parameters
| From: | rasmus@php.net | Date: | Fri, 27 Jul 2012 14:30:39 +0000 |
| Subject: | Bug #62677 [Opn]: preg_match_all: Useless without optional parameters | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8648@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62677&edit=1
ID: 62677
Updated by: rasmus@php.net
Reported by: David dot Dvorak at bnv-tech dot cz
Summary: preg_match_all: Useless without optional parameters
Status: Open
Type: Bug
-Package: *Regular Expressions
+Package: Documentation problem
Operating System: ubuntu3.2
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
That's a documentation bug. $matches is not optional in preg_match_all()
Previous Comments:
------------------------------------------------------------------------
[2012-07-27 13:09:46] David dot Dvorak at bnv-tech dot cz
Description:
------------
The preg_match_all function always returns false if it is used with only mandatory parameters.
Test script:
---------------
var_dump(preg_match_all('/[^0-9\.]/', '455asdf'));
Expected result:
----------------
int(4)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62677&edit=1