Re: Changed behaviour for strtr()

From: Date: Mon, 20 Jun 2011 11:20:05 +0000
Subject: Re: Changed behaviour for strtr()
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-53382@lists.php.net to get a copy of this message
On Mon, 20 Jun 2011, Robert Eisele wrote: > Here is the next one. > > I think it's quite intuitive to use strtr() to remove single characters of a > string, too, instead of using many str_replace($str, $chr, ""). I'd glad to > see this change also in 5.4. Do you mean that (the currently documented): "If from and to have different lengths, the extra characters in the longer of the two are ignored. The length of str will be the same as the return value's." would then change into: "If from and to have different lengths, the extra characters in the longer of the two are assumed to be the empty string, thus removing those characters. The length of str will be the same as the return value's unless the from and to have a different length." cheers, Derick

« previous php.internals (#53382) next »