ID: 25762 User updated by: flaimo at gmx dot net Reported By: flaimo at gmx dot net Status: Bogus Bug Type: Arrays related Operating System: win xp PHP Version: 5CVS-2003-10-06 (dev) New Comment:
well but if a failure is the expected result, than it's a php4 bug and php5 is correct, since php4 returns an array containing the values of $array2. if this is a wanted change from php4 to php5 it should be made public somewhere. Previous Comments: ------------------------------------------------------------------------ [2003-10-06 16:16:34] [EMAIL PROTECTED] 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 All arguments to the function must be arrays, otherwise the function will fail. That is to be expected. ------------------------------------------------------------------------ [2003-10-06 14:05:39] flaimo at gmx dot net Description: ------------ if i use array_merge with two arrays, where one array-variable isn't set, the function returns NULL instead of the values of the other array. Reproduce code: --------------- <?php error_reporting(E_ALL & E_NOTICE); $array2 = array(1, 'a', TRUE); $array3 = array_merge($array2, $array1); // $array1 isn't set var_dump($array3); ?> Expected result: ---------------- works like this in PHP4: undefined variable array1; should return array(1, 'a', true); Actual result: -------------- behaves like this in PHP5 snap: undefined variable array1; returns NULL; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25762&edit=1