Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56285 invoked from network); 16 May 2003 18:37:42 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 16 May 2003 18:37:42 -0000 Received: from jdi.jdimedia.nl (jdi.jdimedia.nl [212.204.192.51]) by jdi.jdimedia.nl (8.12.4/8.12.4) with ESMTP id h4GIba7A001449; Fri, 16 May 2003 20:37:36 +0200 Date: Fri, 16 May 2003 20:37:36 +0200 (CEST) X-X-Sender: derick@jdi.jdimedia.nl To: Moriyoshi Koizumi cc: pollita@php.net, internals@lists.php.net In-Reply-To: <2003051702395375$K#Z@at.wakwak.com> Message-ID: References: <20030516172617.64238.qmail@pb1.pair.com> <2003051702395375$K#Z@at.wakwak.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Bug 23654: str_replace doesn't handle multidimensional arrays From: derick@php.net (Derick Rethans) On Sat, 17 May 2003, Moriyoshi Koizumi wrote: > wrote: > > > I've got fixes for str_replace to let it handle multidimensional arrays, but > > I'm not sure if it should be applied to the 4.3 branch or not. On the one > > hand it changes function behavior so it shouldn't be applied in stable. On > > the other hand, current behavior is ugly and wrong so it should be fixed.. > > > > Thoughts? > > What is your fix like? Actually the current behaviour is ugly, but I don't > see the idea str_replace() should always be able to handle multi-dim > arrays as not all the users want it to do so. At most we'd be better off > if nested arrays were ignored. Agreed on that. Just make it skip arrays for replacements. Derick -- "my other box is your windows PC" ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------