Date: 09/14/01
- Next message: jeroen <email protected>: "[PHP-DEV] Bug #10891 Updated: array_unique does not work properly anymore"
- Previous message: jeroen <email protected>: "[PHP-DEV] Bug #12201 Updated: Order in array function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 11893
Updated by: jeroen
Reported By: michael <email protected>
Old Status: Open
Status: Bogus
Bug Type: Arrays related
Operating System: Linux, FreeBSD, OpenBSD (Any?)
PHP Version: 4.0.6
New Comment:
array_intersect isn't supposed to handle multi-dimmed arrays.
Where have you read that? Not in the manual in any case.
Previous Comments:
------------------------------------------------------------------------
[2001-07-04 19:49:53] michael <email protected>
michael <email protected>:~>php
<?
$a = array(array(1, "a"), array(2, "b"), array(3, "c"));
$b = array(array(1, "a"), array(2, "b"), array(4, "d"));
$c = array_intersect($a, $b);
var_dump($c);
?>
X-Powered-By: PHP/4.0.6
Content-type: text/html
array(3) {
[0]=>
array(2) {
[0]=>
int(1)
[1]=>
string(1) "a"
}
[1]=>
array(2) {
[0]=>
int(2)
[1]=>
string(1) "b"
}
[2]=>
array(2) {
[0]=>
int(3)
[1]=>
string(1) "c"
}
}
The same thing happens in 4.0.5.
For comparison 4.0.4pl1-Output (and as I expect it to be):
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html
array(2) {
[0]=>
array(2) {
[0]=>
int(1)
[1]=>
string(1) "a"
}
[1]=>
array(2) {
[0]=>
int(2)
[1]=>
string(1) "b"
}
}
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=11893&edit=1
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: jeroen <email protected>: "[PHP-DEV] Bug #10891 Updated: array_unique does not work properly anymore"
- Previous message: jeroen <email protected>: "[PHP-DEV] Bug #12201 Updated: Order in array function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

