From:             [EMAIL PROTECTED]
Operating system: Debian unstable
PHP version:      4.1.0
PHP Bug Type:     Arrays related
Bug description:  array_sum() modifies the specified array

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 bug report at: http://bugs.php.net/?id=14795&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to