#32275 [Opn->Csd]: add &count parameter to preg_replace
| From: | andrey@php.net | Date: | Sat, 12 Mar 2005 12:17:42 +0000 |
| Subject: | #32275 [Opn->Csd]: add &count parameter to preg_replace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75245@lists.php.net to get a copy of this message | ||
ID: 32275
Updated by: andrey@php.net
Reported By: techtonik@php.net
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
PHP Version: 5.0.3
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Will appear in 5.1.0
Thanks!
Previous Comments:
------------------------------------------------------------------------
[2005-03-11 08:57:04] techtonik@php.net
Description:
------------
In 5.0.0 were was parameter &count introduced in str_replace() to catch
the total number of matched and replaced needles.
Is it possible to get the same functionality in preg_replace()?
Reproduce code:
---------------
mixed preg_replace ( mixed pattern, mixed replacement, mixed subject [,
int limit] )
Expected result:
----------------
mixed preg_replace ( mixed pattern, mixed replacement, mixed subject [,
int limit[, int &count]] )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32275&edit=1