php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51738 problem with documentation
Submitted: 2010-05-04 14:52 UTC Modified: 2010-05-09 22:09 UTC
From: ignazio dot mostallino at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ignazio dot mostallino at gmail dot com
New email:
PHP Version: OS:

 

 [2010-05-04 14:52 UTC] ignazio dot mostallino at gmail dot com
Description:
------------
This phrase in the documentation is a bit contradictory:
"preg_match() returns the number of times pattern matches. That will be either 0 
times (no match) or 1 time because preg_match() will stop searching after the 
first match."

The first part says that preg_match returns the number of times a patterne 
matches, but the second part says that it only returns 0 or 1... I suggest to 
change it with something like:

preg_match() returns either 0 (no match) or 1(at least one match is found), 
because it will stop searching after the first match.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-09 22:05 UTC] markskilbeck at gmail dot com
That is not a contradiction. The function will match either 0 times, or 1 time. 
However, the grammar needs to be corrected.
 [2010-05-09 22:07 UTC] markskilbeck@php.net
-Status: Open +Status: Bogus
 [2010-05-09 22:07 UTC] markskilbeck@php.net
That is not a contradiction. The function will match either 0 times, or 1 time. 
However, the grammar needs to be corrected.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 03:01:29 2024 UTC