Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53382 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28694 invoked from network); 20 Jun 2011 11:20:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jun 2011 11:20:12 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:60712] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/D8-34681-9EC2FFD4 for ; Mon, 20 Jun 2011 07:20:10 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 3D4C7DE13E; Mon, 20 Jun 2011 12:20:05 +0100 (BST) Date: Mon, 20 Jun 2011 12:20:05 +0100 (BST) X-X-Sender: derick@whisky To: Robert Eisele cc: internals@lists.php.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Changed behaviour for strtr() From: derick@php.net (Derick Rethans) 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