From: sprice at wisc dot edu
Operating system: OS X 10.2.6
PHP version: 4.3.3
PHP Bug Type: Unknown/Other Function
Bug description: call_user_func_array corrupts the passed array

Description:
------------
call_user_func_array seems to corrupt the array that is
passed to the user function through it.

If an array of two strings are passed, and you try to
print $strings[0] you get the first letter of the first
element. If you try to print $strings[1] you get the
2nd letter of the first element.

Reproduce code:
---------------
<?php
function test($testing){
echo $testing[1];
}

$array = array('im testing', 'hello?');

call_user_func_array('test', $array);
echo "\n";
echo $array[1];
?>

Expected result:
----------------
hello?
hello?

Actual result:
--------------
m
hello?

--
Edit bug report at [url]http://bugs.php.net/?id=25526&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25526&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25526&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25526&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25526&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25526&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25526&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25526&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25526&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25526&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25526&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25526&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25526&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25526&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25526&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25526&r=gnused[/url]