ID: 25526 Updated by: [EMAIL PROTECTED] Reported By: sprice at wisc dot edu -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: OS X 10.2.6 PHP Version: 4.3.3 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Re-read the documentation for call_user_func_array() more closely. Your test() should take 2 parameters, the 1st is the variable name and 2nd is the actual array. Previous Comments: ------------------------------------------------------------------------ [2003-09-13 11:57:47] sprice at wisc dot edu 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 this bug report at http://bugs.php.net/?id=25526&edit=1
