php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38876 i do not see the flag for this
Submitted: 2006-09-19 03:09 UTC Modified: 2006-09-19 21:01 UTC
From: itunes66 at gmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.1.6 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: itunes66 at gmail dot com
New email:
PHP Version: OS:

 

 [2006-09-19 03:09 UTC] itunes66 at gmail dot com
Description:
------------
if possible add a constant to make preg_match_all return a 
number of how many matches there were e.g. PREG_COUNT, 
PREG_COUNT_MATCHES, or something like that it would be very 
useful and alot eaisier than running a while loop over the 
code and incrementing variables in the loop

Reproduce code:
---------------
none

Actual result:
--------------
none

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-19 07:14 UTC] derick@php.net
It already does this, see the documentation at: http://uk.php.net/preg_match_all
 [2006-09-19 17:53 UTC] itunes66 at gmail dot com
i do not see where it returns the complete number of results 
matched, could you point this out to me
 [2006-09-19 17:59 UTC] derick@php.net
It's simply the return value of the function.. .it's in the manual so please read it once more.
 [2006-09-19 18:15 UTC] itunes66 at gmail dot com
oh, i see its kinda out of place i think the text "Returns the 
number of full pattern matches (which might be zero), or FALSE 
if an error occurred." should be in bold or a note or 
itacilised to make it more noticable :), thank you
 [2006-09-19 21:01 UTC] derick@php.net
.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 09:01:33 2025 UTC