Re: [PHP-DEV] string replacement

2001-01-22 Thread Andrei Zmievski
Done. On Mon, 22 Jan 2001, Martin Jansen wrote: > On Mon, 22 Jan 2001 16:28:09 +0100 (CET), Derick Rethans wrote: > > >On Mon, 22 Jan 2001, Andrei Zmievski wrote: > >> I could modify str_replace() to have the same behavior with regard to > >> arrays as preg_replace() - if people agree that it's

Re: [PHP-DEV] string replacement

2001-01-22 Thread Martin Jansen
On Mon, 22 Jan 2001 16:28:09 +0100 (CET), Derick Rethans wrote: >On Mon, 22 Jan 2001, Andrei Zmievski wrote: >> I could modify str_replace() to have the same behavior with regard to >> arrays as preg_replace() - if people agree that it's a good idea.. > >I think it's a good idea, makes the langua

Re: [PHP-DEV] string replacement

2001-01-22 Thread Derick Rethans
On Mon, 22 Jan 2001, Andrei Zmievski wrote: > On Mon, 22 Jan 2001, Jan Borsodi wrote: > > So I ask again: > > Are there any plans to make str_replace and ereg_replace take arrays > > as parameters as well, in the same manner as preg_replace does? > > (a simple yes or no will suffice) > > > > Or d

Re: [PHP-DEV] string replacement

2001-01-22 Thread Andrei Zmievski
On Mon, 22 Jan 2001, Jan Borsodi wrote: > So I ask again: > Are there any plans to make str_replace and ereg_replace take arrays > as parameters as well, in the same manner as preg_replace does? > (a simple yes or no will suffice) > > Or do I have to do this myself? I could modify str_replace()

Re: [PHP-DEV] string replacement

2001-01-22 Thread Jan Borsodi
Cynic <[EMAIL PROTECTED]> writes: > so it's probably not str_replace what's slowing you down, but > the loops? Maybe they could be optimized some more... (I don't > want it sound like I'm saying it's your fault, or that you're > a bad programmer, just to make it clear.) No it's not the loops

Re: [PHP-DEV] string replacement

2001-01-21 Thread Jan Borsodi
Cynic <[EMAIL PROTECTED]> writes: > why is it bad? Why? Because it's quite normal for functions like str_replace to be *much* faster than preg_replace, but since str_replace on arrays is slower (due to iterating over them using PHP code) you have to use preg_replace. I'll happily use preg_repla

Re: [PHP-DEV] string replacement

2001-01-21 Thread Cynic
why is it bad? At 19:45 21.1. 2001, Jan Borsodi wrote the following: -- >Is there any plans to extend str_replace and ereg_replace to accept >arrays in the same manner as preg_replace does? > >At the moment using preg_replace on arrays