On Thu, 12 Jul 2001, Wez Furlong wrote:
> Hi Andrei (and anyone else in on pcre),
> 
> This doesn't work as you might expect if you were used to preg_replace:
> 
> preg_replace_callback(
>     array( ...patterns...),
>     array( ...callbacks...),
>     $subject);
> 
> Instead, it expects a single callback as the second parameter.
> 
> Any chance that it could be made to do so, or are there technical reasons
> not to?

Yes, there is a technical reason. It's the same reason that I split this
functionality out into a separate function instead of continuing to use
the /F modifier. The reason is that in order to call class methods you
have to use array($obj, 'method') or array('class', 'method') syntax for
callback and that quickly becomes ambiguous when trying to figure out if
you were passed one callback or several.

-Andrei

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to