On 02/03/2013 02:39 PM, Karoly Negyesi wrote: >> array_diff_asccoc() comparing array(1,2,3) to "Array" and saying those >> were equivalent without any sort of notice. > > That's not what happened, some contib was comparing array(1,2,3) to > array(1,2,array(3)) and even looking at the documentation it is not > clear whether the cast should or should not throw a notice. But, if > that's desired behavior, I will add a note to warn people.
The cast should always throw a notice. The function is documented to only compare single-dimensional arrays, so if you pass it a multi-dimensional array it is going to treat them as a single dimensional and the only way to do that is to cast them to scalars. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php