|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-14 20:14 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 20:00:01 2025 UTC |
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?