Re: addslashes' speed

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: addslashes' speed
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-2901@lists.php.net to get a copy of this message
> I'll commit it soon. I'm currently doing some final tests with str2str() > > /* {{{ proto string str2str(string haystack, string needle, string str) > Replaces all occurences of needle in haystack with str */ > > It's especially interesting since it's binary safe, e.g. replacing all NUL > bytes in /vmlinuz is no problem. The only problem while implementing it > was that erealloc(a,b) didn't return a or 0, but a different value. Just a comment on the naming here. How about str_replace() to go along with the chr_replace() function. Or, it may be an idea to get rid of chr_replace() completely and just have str_replace() use the single character replacement routine if the needle arg is a single char. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2901) next »