Re: PHP 4.0 Bug #6002 Updated: array_diff / array_intersect returning wrong elements

From: Date: Mon, 07 Aug 2000 21:39:05 +0000
Subject: Re: PHP 4.0 Bug #6002 Updated: array_diff / array_intersect returning wrong elements
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-28049@lists.php.net to get a copy of this message
On Mon, Aug 07, 2000 at 11:57:47AM -0000, Bug Database wrote: > "var_dump($result);" you´ll receive > array(2) { [1]=> string(5) "page2" [2]=> string(5) "page3" } > that´s fine, it has preserved the keys too! (perhaps a nice feature) > I think it´s like with comparing arrays with == and ===, I´d vote for a FLAG on array_diff() > (and array_intersect()), indicating if it should perform an ordered _diff (_intersect)(preserving > keys, usually equal or fewer matches then unordered _diff) or unordered _diff > (_intersect)(flatten(resuling array begins at index 0), finds all similarities) > > Resumé: I think it should be transformed into a Feature/Request bug and if not changed, it > should be documented. OK, I'll update the doc, maybe I'll add some features later. Stig

« previous php.dev (#28049) next »