Bug #14992 Updated: Behaviour of $array = $array1 + $array2; not documented

From: Date: Fri, 11 Jan 2002 11:03:44 +0000
Subject: Bug #14992 Updated: Behaviour of $array = $array1 + $array2; not documented
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76613@lists.php.net to get a copy of this message
ID: 14992 Updated by: philip Reported By: mfischer@php.net Status: Open Bug Type: Documentation problem PHP Version: 4.1.1 New Comment: Where should this feature be documented, I see two viable options: a) Under array_merge() b) A new "Array Operators" man page. I assume most people wanting to merge arrays will go to array_merge() but having it's own man page could make room to clearly explain the differences of it and array_merge and array_merge_recursive. I vote for (b). Of course the functions would link to it. This is kinda like how backticks are documented now, as, "Execution Operators". A brief note under "Arithmetic Operators" may be appropriate too. Also, for those interested in documenting this beast, please see this post: http://marc.theaimsgroup.com/?l=phpdoc&m=101074306518514 Previous Comments: ------------------------------------------------------------------------ [2002-01-11 05:04:53] mfischer@php.net The behaviour of the following code doens't seem to be documented: <? $foo = array(27 => 'Ene'); $bar = array(-1 => 'Mene'); $baz = $foo + $bar; var_dump($baz); ?> array(2) { [27]=> string(3) "Ene" [-1]=> string(4) "Mene" } ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14992&edit=1

« previous php.dev (#76613) next »