#46765 [NEW]: array_merge documentation incorrectly states that "arrays will be preserved"
| From: | charonme at yahoo dot com | Date: | Fri, 05 Dec 2008 14:29:58 +0000 |
| Subject: | #46765 [NEW]: array_merge documentation incorrectly states that "arrays will be preserved" | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-1585@lists.php.net to get a copy of this message | ||
From: charonme at yahoo dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: array_merge documentation incorrectly states that "arrays will be
preserved"
Description:
------------
Related bug: http://bugs.php.net/bug.php?id=42323
array_merge documentation states: "If you want to completely preserve the
arrays and just want to append them to each other (not overwriting the
previous keys), use the + operator"
However, both arrays (plural) are not preserved, only the first array
(singular) is preserved and the second array is NOT preserved if there are
some keys that are already defined in the first array. The documentation
needs to be clear enough to state that the second array might not be
preserved at all even though the first array (singular) will always be
preserved.
--
Edit bug report at http://bugs.php.net/?id=46765&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46765&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46765&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46765&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46765&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46765&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=46765&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46765&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46765&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46765&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46765&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46765&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46765&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46765&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46765&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46765&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46765&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46765&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46765&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46765&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46765&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46765&r=mysqlcfg