Bug in french documentation about array operators

From: Date: Sun, 08 Jul 2012 19:59:57 +0000
Subject: Bug in french documentation about array operators
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8542@lists.php.net to get a copy of this message
Hello, I found a bug on this page : http://www.php.net/manual/fr/language.operators.array.php. This page informe that the addition of two arrays add datas of left array to datas of the right array : " L'opérateur /+/ retourne le tableau de droite auquel sont ajoutés les éléments du tableau de gauche." After test it, i note the comportement is opposite. The addition of these arrays result in the addition of datas of the right array to data of the left array : <?php $array1=['a'=>1,'b'=>2]; $array2=['a'=>'A','B','C']; var_dump($array1+$array2); ?> Ouput : array(4) { ["a"]=> int(1) ["b"]=> int(2) [0]=> string(1) "B" [1]=> string(1) "C" } Best regards, Nicolas Blaudez

« previous php.doc.bugs (#8542) next »