note 14311 added to function.array-diff.php

From: Date: Thu, 26 Jul 2001 07:57:00 +0000
Subject: note 14311 added to function.array-diff.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15860@lists.php.net to get a copy of this message
In version 4.0.1 to 4.0.4, array_diff() works on array of array, but not anymore in version 4.0.5 and 4.0.6.<br> According to php team : When I wrote array_diff I didn't think of this use. It worked by accident. array_diff was changed to avoid some ordering problems. The way it was there was no well defined ordering. Due to automatic type conversion, you you would have 3d < 99 < 370 < 3d. This made array_diff fail, this was fixed by always using string comparisons. That doesn't work for arrays though. http://www.php.net/manual/en/function.array-diff.php

« previous php.notes (#15860) next »