note 108933 added to function.array-merge
| From: | spidgorny at gmail dot com | Date: | Wed, 06 Jun 2012 13:47:18 +0000 |
| Subject: | note 108933 added to function.array-merge | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188420@lists.php.net to get a copy of this message | ||
Well, this is confusing. The similarities and the differences between array_merge() and array +
array is sometimes subtle and hard to remember. So I have investigated it in the detail and wrote a
blog post:
http://spidgorny.blogspot.de/2010/09/arraymerge-vs-array-concatenation-and.html
It contains a comparison table which makes it clear which function to use in which case as well as
my own (best) array_merge_recursive_overwrite() function.
----
Server IP: 69.147.83.197
Probable Submitter: 80.187.201.88
----
Manual Page -- http://www.php.net/manual/en/function.array-merge.php
Edit -- https://master.php.net/note/edit/108933
Del: integrated -- https://master.php.net/note/delete/108933/integrated
Del: useless -- https://master.php.net/note/delete/108933/useless
Del: bad code -- https://master.php.net/note/delete/108933/bad+code
Del: spam -- https://master.php.net/note/delete/108933/spam
Del: non-english -- https://master.php.net/note/delete/108933/non-english
Del: in docs -- https://master.php.net/note/delete/108933/in+docs
Del: other reasons-- https://master.php.net/note/delete/108933
Reject -- https://master.php.net/note/reject/108933
Search -- https://master.php.net/manage/user-notes.php