cvs: phpdoc-fr /reference/array/functions array-diff.xml array-keys.xml array-map.xml array-merge.xml array-unique.xml

From: Date: Thu, 26 Mar 2009 08:59:31 +0000
Subject: cvs: phpdoc-fr /reference/array/functions array-diff.xml array-keys.xml array-map.xml array-merge.xml array-unique.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-6851@lists.php.net to get a copy of this message
dams Thu Mar 26 08:59:31 2009 UTC Modified files: /phpdoc-fr/reference/array/functions array-diff.xml array-keys.xml array-map.xml array-merge.xml array-unique.xml Log: synch with en

http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/array/functions/array-diff.xml?r1=1.28&r2=1.29&diff_format=u Index: phpdoc-fr/reference/array/functions/array-diff.xml diff -u phpdoc-fr/reference/array/functions/array-diff.xml:1.28 phpdoc-fr/reference/array/functions/array-diff.xml:1.29 --- phpdoc-fr/reference/array/functions/array-diff.xml:1.28 Sun Jun 8 19:52:16 2008 +++ phpdoc-fr/reference/array/functions/array-diff.xml Thu Mar 26 08:59:31 2009 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.28 $ --> -<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.29 $ --> +<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xml:id="function.array-diff" xmlns="http://docbook.org/ns/docbook"> @@ -18,7 +18,8 @@ <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> - Compare le tableau <parameter>array1</parameter> avec le tableau + <function>array_diff</function> compare le tableau + <parameter>array1</parameter> avec le tableau <parameter>array2</parameter> et retourne la différence. </para> </refsect1> @@ -63,6 +64,35 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.0.4</entry> + <entry> + <warning> + <simpara> + Cela était buggé en PHP 4.0.4! + <!-- TODO: when exactly was this broken?... --> + </simpara> + </warning> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -111,11 +141,6 @@ en utilisant <literal>array_diff($array1[0], $array2[0]);</literal>. </para> </note> - <warning> - <simpara> - Cette fonction était inutilisable en PHP 4.0.4 ! - </simpara> - </warning> </refsect1> <refsect1 role="seealso"> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/array/functions/array-keys.xml?r1=1.25&r2=1.26&diff_format=u Index: phpdoc-fr/reference/array/functions/array-keys.xml diff -u phpdoc-fr/reference/array/functions/array-keys.xml:1.25 phpdoc-fr/reference/array/functions/array-keys.xml:1.26 --- phpdoc-fr/reference/array/functions/array-keys.xml:1.25 Mon Jan 19 20:07:48 2009 +++ phpdoc-fr/reference/array/functions/array-keys.xml Thu Mar 26 08:59:31 2009 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.25 $ --> -<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.26 $ --> +<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xml:id="function.array-keys" xmlns="http://docbook.org/ns/docbook"> @@ -26,8 +26,6 @@ seules les clés ayant cette valeur seront retournées. Sinon, toutes les clés de <parameter>input</parameter> sont retournées. - Depuis PHP 5, vous pouvez utiliser le paramètre <parameter>strict</parameter> - pour une comparaison incluant le type (===). </para> </refsect1> @@ -55,8 +53,8 @@ <term><parameter>strict</parameter></term> <listitem> <para> - Depuis PHP 5, ce paramètre détermine si une comparaison stricte (===) - doit être utilisée lors la recherche. + Le paramètre <parameter>strict</parameter> force la comparaison + en mode strict, incluant le type, avec l'opérateur ===. </para> </listitem> </varlistentry> @@ -71,6 +69,30 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + Ajout du paramètre <parameter>strict</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/array/functions/array-map.xml?r1=1.28&r2=1.29&diff_format=u Index: phpdoc-fr/reference/array/functions/array-map.xml diff -u phpdoc-fr/reference/array/functions/array-map.xml:1.28 phpdoc-fr/reference/array/functions/array-map.xml:1.29 --- phpdoc-fr/reference/array/functions/array-map.xml:1.28 Sat Nov 29 19:07:29 2008 +++ phpdoc-fr/reference/array/functions/array-map.xml Thu Mar 26 08:59:31 2009 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.28 $ --> -<!-- EN-Revision: 1.21 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.29 $ --> +<!-- EN-Revision: 1.22 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-map"> @@ -71,6 +71,31 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Il est maintenant possible d'utiliser une fonction + lambda comme paramètre <parameter>callback</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/array/functions/array-merge.xml?r1=1.40&r2=1.41&diff_format=u Index: phpdoc-fr/reference/array/functions/array-merge.xml diff -u phpdoc-fr/reference/array/functions/array-merge.xml:1.40 phpdoc-fr/reference/array/functions/array-merge.xml:1.41 --- phpdoc-fr/reference/array/functions/array-merge.xml:1.40 Wed Jun 11 10:03:02 2008 +++ phpdoc-fr/reference/array/functions/array-merge.xml Thu Mar 26 08:59:31 2009 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.40 $ --> -<!-- EN-Revision: 1.22 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.41 $ --> +<!-- EN-Revision: 1.23 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xml:id="function.array-merge" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>array_merge</refname> - <refpurpose>Fusionne un ou plusieurs tableaux</refpurpose> + <refpurpose>Fusionne plusieurs tableaux en un seul</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; @@ -17,7 +17,8 @@ <methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam> </methodsynopsis> <para> - Rassemble les éléments d'un ou de plusieurs tableaux en ajoutant les valeurs + <function>array_merge</function> rassemble les éléments + d'un ou de plusieurs tableaux en ajoutant les valeurs de l'un à la fin de l'autre. Le résultat est un tableau. </para> <para> @@ -27,7 +28,7 @@ les valeurs sont ajoutées en fin de tableau. </para> <para> - Si vous passez un seul tableau à cette fonction et qu'il a des indices + Si vous passez un seul tableau à cette fonction et qu'il a des index numériques, les clés seront réindexées normalement. </para> </refsect1> @@ -39,7 +40,7 @@ <term><parameter>array1</parameter></term> <listitem> <para> - Tableau initial à rassembler. + Tableau initial à fusionner. </para> </listitem> </varlistentry> @@ -47,7 +48,7 @@ <term><parameter>array</parameter></term> <listitem> <para> - Liste variable de tableaux à rassembler récursivement. + Liste de tableaux à fusionner, récursivement. </para> </listitem> </varlistentry> @@ -117,7 +118,7 @@ </screen> <para> Si vous voulez préserver complètement les tableaux, et que - vous souhaitez simplement les ajouter les uns aux autres, + vous souhaitez simplement les fusionner les uns aux autres, utilisez l'opérateur <literal>+</literal> : </para> <programlisting role="php"> @@ -142,18 +143,35 @@ </screen> </example> </para> - <warning> - <para> - Le comportement de <function>array_merge</function> a été modifié en PHP 5. - Contrairement à PHP 4, <function>array_merge</function> n'accepte que - des paramètres de type <type>array</type>. Cependant, vous pouvez utiliser - le transtypage pour fusionner les autres types de valeurs. - Voyez l'exemple ci-dessous. - </para> - <para> - <example> - <title>Exemple avec <function>array_merge</function> en PHP 5</title> - <programlisting role="php"> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + <warning> + <para> + Le comportement de <function>array_merge</function> a été modifié en PHP 5. + Contrairement à PHP 4, <function>array_merge</function> n'accepte que + des paramètres de type <type>array</type>. Cependant, vous pouvez utiliser + le transtypage pour fusionner les autres types de valeurs. + Voyez l'exemple ci-dessous. + </para> + <para> + <example> + <title>Exemples PHP 5 avec <function>array_merge</function></title> + <programlisting role="php"> <![CDATA[ <?php $beginning = 'foo'; @@ -162,21 +180,28 @@ print_r($result); ?> ]]> - </programlisting> - &example.outputs; - <screen role="php"> -<![CDATA[ -Array -( - [0] => foo - [1] => bar -) -]]> - </screen> - </example> - </para> - </warning> + </programlisting> + &example.outputs; + <screen role="php"> + <![CDATA[ + Array + ( + [0] => foo + [1] => bar + ) +]]> + </screen> + </example> + </para> + </warning> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/array/functions/array-unique.xml?r1=1.25&r2=1.26&diff_format=u Index: phpdoc-fr/reference/array/functions/array-unique.xml diff -u phpdoc-fr/reference/array/functions/array-unique.xml:1.25 phpdoc-fr/reference/array/functions/array-unique.xml:1.26 --- phpdoc-fr/reference/array/functions/array-unique.xml:1.25 Sat Feb 14 09:11:14 2009 +++ phpdoc-fr/reference/array/functions/array-unique.xml Thu Mar 26 08:59:31 2009 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.25 $ --> -<!-- EN-Revision: 1.21 Maintainer: dams Status: ready --> +<!-- $Revision: 1.26 $ --> +<!-- EN-Revision: 1.22 Maintainer: dams Status: ready --> <!-- Reviewed: yes --> <refentry xml:id="function.array-unique" xmlns="http://docbook.org/ns/docbook"> @@ -16,8 +16,9 @@ <methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam> </methodsynopsis> <para> - Prend le tableau <parameter>array</parameter> et - retourne un nouveau tableau, complètement dédoublonné. + <function>array_unique</function> extrait du tableau + <parameter>array</parameter> les valeurs distinctes, + et supprime tous les doublons. </para> <para> Notez que les clés sont préservées. <function>array_unique</function> @@ -174,6 +175,16 @@ </para> </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <note> + <simpara> + Notez que <function>array_unique</function> n'est pas conçu + pour fonctionner avec des tableaux multidimensionnels. + </simpara> + </note> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file
« previous php.doc.fr (#6851) next »