Re: string replacement

From: Date: Sun, 21 Jan 2001 22:00:56 +0000
Subject: Re: string replacement
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-44688@lists.php.net to get a copy of this message
Cynic <cynic@mail.cz> 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_replace whenever I need to do some Regular Expression replacement, but when I want to do normal text replacement I expect str_replace to give me the same flexibility as preg_replace. That's why! -- - Jan Borsodi <jb@ez.no> - Systems Engineer @ eZ systems - Web: http://ez.no QtVu: http://www.qtvu.org - RegExplorer: http://regexplorer.sourceforge.net EMacro: http://emacro.sourceforge.net - Apollo: http://www.apolloplayer.org

« previous php.dev (#44688) next »