|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-09 11:09 UTC] andrey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 22:00:01 2025 UTC |
First of all, thanks for a nice fature. I've been playing with preg_replace(PATTERN, REPLACE, SUBJECT) and find it very usefull, but I miss the s/PATTERN/FUNCTION/e from Perl. I would like to do something like this: <?php $tmp = "one two three"; echo preg_replace("/(two)/", strrev("\\1"), $tmp); ?> BTW, this example get's a SEGFAULT FATAL: emalloc(): Unable to allocate 271313254 bytes httpd: [Wed Jun 9 10:22:17 1999] [notice] child pid 4235 exit signal Segmentation fault (11) I've looked at the pcre.sgml, but can't find anything that can help me. Execution for a function works, but that doesn't help me as long I can't use matches from the regexp. Is it possible to pass \\1 as a variable to a function? Rune Nordb?e Skillingstad