Bug #14795 Updated: array_sum() modifies the specified array
| From: | andrei@php.net | Date: | Wed, 24 Apr 2002 15:24:13 +0000 |
| Subject: | Bug #14795 Updated: array_sum() modifies the specified array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-5841@lists.php.net to get a copy of this message | ||
ID: 14795
Updated by: andrei@php.net
Reported By: jimw@apache.org
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: Debian unstable
PHP Version: 4.1.0
New Comment:
This bug has been fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2002-01-02 06:19:22] jimw@apache.org
the documentation claims this behavior was changed after 4.0.6, but it
appears to behave the same in 4.1.0. (and i don't see a commit to
ext/standard/array.c that indicates any such change to array_sum.)
$a = array(1, 2, "foo");
print_r($a);
echo array_sum($a);
print_r($a);
results in:
Array
(
[0] => 1
[1] => 2
[2] => foo
)
3Array
(
[0] => 1
[1] => 2
[2] => 0
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=14795&edit=1