#47370 [Opn->Asn]: array_unique has backward compatibility problem, and SORT_REGULAR is confusing

From: Date: Mon, 16 Feb 2009 20:26:15 +0000
Subject: #47370 [Opn->Asn]: array_unique has backward compatibility problem, and SORT_REGULAR is confusing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-133887@lists.php.net to get a copy of this message
ID: 47370 Updated by: jani@php.net Reported By: for-bugs at hnw dot jp -Status: Open +Status: Assigned Bug Type: Arrays related Operating System: any PHP Version: 5.2.9RC1 -Assigned To: +Assigned To: andrei Previous Comments: ------------------------------------------------------------------------ [2009-02-14 08:28:18] for-bugs at hnw dot jp OK, you think comparing elements as string is harmful, doesn't you? Then, how about array_diff() or array_intersect()? They compare array elements with string representation. Isn't it harmful? ------------------------------------------------------------------------ [2009-02-14 08:22:26] moriyoshi@php.net This was not discussed, and thus no bogus thing. ------------------------------------------------------------------------ [2009-02-13 22:27:35] andrei@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The slight BC breakage is negligible compared to the benefits of getting it to work properly. ------------------------------------------------------------------------ [2009-02-13 01:53:09] for-bugs at hnw dot jp Thank you so much. The snapshot returns same result to PHP 5.2.8 with reproduce code. Such as: array(2) { [0]=> int(0) [1]=> string(0) "" } array(2) { [0]=> string(0) "" [1]=> string(1) "0" } ------------------------------------------------------------------------ [2009-02-12 18:58:34] moriyoshi@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/47370 -- Edit this bug report at http://bugs.php.net/?id=47370&edit=1

« previous php.bugs (#133887) next »