Req #69189 [Opn]: Passing multiple callbacks to preg_replace_callback.
| From: | demon@php.net | Date: | Thu, 12 Mar 2015 03:08:57 +0000 |
| Subject: | Req #69189 [Opn]: Passing multiple callbacks to preg_replace_callback. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191333@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69189&edit=1
ID: 69189
Updated by: demon@php.net
Reported by: admin at azareal dot com
Summary: Passing multiple callbacks to preg_replace_callback.
Status: Open
Type: Feature/Change Request
Package: PCRE related
Operating System: Any
PHP Version: master-Git-2015-03-04 (Git)
Block user comment: N
Private report: N
New Comment:
Do you mean: https://wiki.php.net/rfc/preg_replace_callback_array
?
Previous Comments:
------------------------------------------------------------------------
[2015-03-05 15:15:23] reeze@php.net
no matter whatever you want you could wrapper them in the single callable.
------------------------------------------------------------------------
[2015-03-05 04:52:05] laruence@php.net
actually, I proposed something like that.. but it was declined
need looking for it in ML :<
------------------------------------------------------------------------
[2015-03-04 23:20:41] php at requinix dot net
But how would that work? The first callback takes an array of matches as an argument, returns a
string for the replacement, then the second does... what?
Maybe you have an example in mind?
------------------------------------------------------------------------
[2015-03-04 22:47:37] admin at azareal dot com
Description:
------------
It would be nice, if it was possible to pass multiple callbacks to preg_replace_callback instead of
just one. One possible method might be by placing them in an array.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69189&edit=1