Date: 05/24/01
- Next message: Sascha Schumann: "Re: [PHP-DEV] Bug #11010 Updated: current cvs cannot configure"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] 4.0.6RC2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: bilo <email protected>
Operating system: Linux
PHP version: 4.0.5
PHP Bug Type: PCRE related
Bug description: preg_replace_callback and class methods
I was using preg_replace with the '/F' parameter, and it
was working perfectly till v4.0.4pl1. Now it has been
substituted by preg_replace_callback.
Does preg_replace_callback work with class method as a callback function, too? If it does, how should it be
written?
I'm asking this because in each of these cases:
preg_replace_callback(/{([A-Z_][A-Z0-9_]*)}/i', $this->callmeback, $text);
preg_replace_callback(/{([A-Z_][A-Z0-9_]*)}/i', "\$this->callmeback", $text);
preg_replace_callback(/{([A-Z_][A-Z0-9_]*)}/i', '$this->callmeback', $text);
I get a warning:
preg_replace_callback() requires argument 2, [...],
to be a valid callback
More: there is another drawback. With preg_replace + '/F' parameter I could also specify additional parameters in the command line. Now I can't.
-- Edit Bug report at: http://bugs.php.net/?id=11085&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sascha Schumann: "Re: [PHP-DEV] Bug #11010 Updated: current cvs cannot configure"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] 4.0.6RC2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

