note 10880 deleted from function.array-merge by sniper
| From: | sniper@php.net | Date: | Mon, 06 Oct 2003 22:56:19 +0000 |
| Subject: | note 10880 deleted from function.array-merge by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57926@lists.php.net to get a copy of this message | ||
Note Submitter: keringo@hotmail.com
----
The PHP Developer's Cookbook claims (p. 87 and sort of on p. 108)
that '+' is syntactic sugar for array_merge.
However,
$foo = array(7, 3, 9);
$bar = array(87, 43, 18, 99, 101);
$baz1 = array_merge($foo, $bar);
$baz2 = $foo + $bar;
leads to (7, 3, 9, 87, 43, 18, 99, 101) vs. (7, 3, 9, 99, 101).
Where is this documented? Shouldn't there be a '+' listed in the array functions
section?