note 33734 rejected from function.array-intersect by didou

From: Date: Thu, 21 Aug 2003 12:39:15 +0000
Subject: note 33734 rejected from function.array-intersect by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54820@lists.php.net to get a copy of this message
Note Submitter: mikhail_kovalev@mail.ru ---- [quote] Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same. [/quote] What is this? String representation of any array is "Array", and so, all arrays are equal according to this rule. Therefore the elements of the arrays cannot be arrays themselves. Say, if $array_1 and $array_2 are of the form array( array(...), array(...), array(...), ...) array_intersect($array_1, $array_2) will return same as array_merge($array_1, $array_2).

« previous php.notes (#54820) next »