note 36662 added to function.preg-replace-callback

From: Date: Fri, 17 Oct 2003 23:46:18 +0000
Subject: note 36662 added to function.preg-replace-callback
Groups: php.notes 
Request: Send a blank email to php-notes+get-58777@lists.php.net to get a copy of this message
preg_replace_callback fails to work recursively. I mean: function replace1($match) { return 'This is recursively called'; } function replace2($match) { ... do something return preg_replace_callback($anotherregexp, 'replace2', $astr); } ... echo preg_replace_callback($regexp, 'replace2', $str); Will fail to produce the string. Although, both functions replace1 and replace2 are actually called!!! Is this documented anywhere, or is a bug? Manu. ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36662 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36662&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36662&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58777) next »