Re: cvs: php-src /ext/standard array.c

From: Date: Wed, 25 Feb 2009 20:26:27 +0000
Subject: Re: cvs: php-src /ext/standard array.c
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-43172@lists.php.net to get a copy of this message
Last call: any more objections? Moriyoshi On Thu, Feb 19, 2009 at 11:52 AM, Moriyoshi Koizumi <mozo@mozo.jp> wrote: > On Thu, Feb 19, 2009 at 4:51 AM, Andrei Zmievski <andrei@gravitonic.com> wrote: >> Moriyoshi Koizumi wrote: >>> >>> As I said earlier, the function is never supposed to be used with >>> objects. Therefore, we cannot declare it to be broken, and any change >>> to the behavior anyway leads to a huge BC break. I got a report that >>> claims the reporter's real-world application behaves strangely with >>> the latest release candidate. >> >> Should we have array_unique_for_non_strings() then or something? > > That'd be stupid. What is reasonable is to make it default to > SORT_STRING... Or is there any strong reason to make the default > SORT_REGULAR now that you can specify SORT_REGULAR to array_unique() > throught the second argument? > >> >>> That said, I'm not really against making SORT_REGULAR default for >>> later versions than 5.2.x as long as *appropriate notices* are >>> provided, while I strongly disagree for 5.2.x. >> >> What sort of notices do you propose? At runtime or in the docs? > > You even didn't mention that the behavior would be changed starting > with 5.2.9 in the document, instead you simply added the description > for the second optional argument that defaults to SORT_REGULAR, as if > it was the default long before. That's absolutely the thing we should > not do. > > Eitherway, if we were to make such change, I think we should at least > make the second argument mandatory. > > Moriyoshi > >> >> -Andrei >> >

« previous php.internals (#43172) next »