#23581 [NEW]: array_map(NULL, array, array ...) yields an undefined result
| From: | moriyoshi@php.net | Date: | Sun, 11 May 2003 06:26:21 +0000 |
| Subject: | #23581 [NEW]: array_map(NULL, array, array ...) yields an undefined result | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-39433@lists.php.net to get a copy of this message | ||
From: moriyoshi@php.net
Operating system: any
PHP version: 4.3.2RC2
PHP Bug Type: Arrays related
Bug description: array_map(NULL, array, array ...) yields an undefined result
<?php
var_dump(
array_map(
NULL,
array(1,2,3),
array(4,5,6),
array(7,8,9)
)
);
?>
result:
array(3) {
[0]=>
array(3) {
[0]=>
&UNKNOWN:0
[1]=>
&UNKNOWN:0
[2]=>
&UNKNOWN:0
}
[1]=>
array(3) {
[0]=>
&UNKNOWN:0
[1]=>
&UNKNOWN:0
[2]=>
&UNKNOWN:0
}
[2]=>
array(3) {
[0]=>
&UNKNOWN:0
[1]=>
&UNKNOWN:0
[2]=>
&UNKNOWN:0
}
}
while it should be
array(3) {
[0]=>
array(3) {
[0]=>
int(1)
[1]=>
int(4)
[2]=>
int(7)
}
[1]=>
array(3) {
[0]=>
int(2)
[1]=>
int(5)
[2]=>
int(8)
}
[2]=>
array(3) {
[0]=>
int(3)
[1]=>
int(6)
[2]=>
int(9)
}
}
--
Edit bug report at http://bugs.php.net/?id=23581&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23581&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23581&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23581&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23581&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23581&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23581&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23581&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23581&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23581&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23581&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23581&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23581&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23581&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23581&r=gnused