ID: 30709 Updated by: [EMAIL PROTECTED] Reported By: cristian dot melendez at gmail dot com -Status: Open +Status: Bogus Bug Type: Regexps related Operating System: Windows XP PHP Version: 5.0.1 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2004-11-07 05:50:01] cristian dot melendez at gmail dot com Description: ------------ i'm using preg_replace() with the /e modifier to force php code to be run at the replacement. preg_replace() and /e won't work if, instead of a regular function, i use a class object. Reproduce code: --------------- code shown in http://www.php.net/preg_replace <?php preg_replace("/(<\/?)(\w+)([^>]*>)/e", "'\\1' . strtoupper('\\2') . '\\3'", $html_body); ?> my code: <?php $someclass = new someclass(); preg_replace("/(<\/?)(\w+)([^>]*>)/e", "'\\1' . $someclass->somefunction('\\2') . '\\3'", $html_body); ?> Expected result: ---------------- preg_replace ignores $someclass->somefunction() and just returns the text. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30709&edit=1
