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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC