Re: Re: preg_replace_callback

From: Date: Fri, 13 Jul 2001 08:45:28 +0000
Subject: Re: Re: preg_replace_callback
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-59949@lists.php.net to get a copy of this message
On 13/07/01, "Andrei Zmievski" <andrei@ispi.net> wrote: > On Thu, 12 Jul 2001, Wez Furlong wrote: > > This doesn't work as you might expect if you were used to preg_replace: > > preg_replace_callback(array( ...patterns...), array( ...callbacks...), > callback and that quickly becomes ambiguous when trying to figure out if > you were passed one callback or several. That is a good reason. I was mostly thinking about the performance of several calls to preg_replace_callback, but then again, the bottleneck is going to be in pcre itself with multiple patterns. This case should probably be documented in the manual to prevent anyone else getting confused! --Wez.

« previous php.dev (#59949) next »