cvs: phpdoc-fr /appendices timezones.xml /language functions.xml
| From: | Guillaume Plessis | Date: | Wed, 02 Apr 2008 15:10:17 +0000 |
| Subject: | cvs: phpdoc-fr /appendices timezones.xml /language functions.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-5684@lists.php.net to get a copy of this message | ||
gui Wed Apr 2 15:10:17 2008 UTC
Modified files:
/phpdoc-fr/language functions.xml
/phpdoc-fr/appendices timezones.xml
Log:
sync with EN
http://cvs.php.net/viewvc.cgi/phpdoc-fr/language/functions.xml?r1=1.49&r2=1.50&diff_format=u Index: phpdoc-fr/language/functions.xml diff -u phpdoc-fr/language/functions.xml:1.49 phpdoc-fr/language/functions.xml:1.50 --- phpdoc-fr/language/functions.xml:1.49 Sun Feb 24 10:11:55 2008 +++ phpdoc-fr/language/functions.xml Wed Apr 2 15:10:17 2008 @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.49 $ --> -<!-- EN-Revision: 1.66 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.50 $ --> +<!-- EN-Revision: 1.69 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - <chapter xml:id="language.functions" xmlns="http://docbook.org/ns/docbook"> <title>Les fonctions</title> <sect1 xml:id="functions.user-defined"> - <title>Les fonctions</title> + <title>Les fonctions définies par l'utilisateur</title> + <para> Une fonction peut être définie en utilisant la syntaxe suivante : </para> <para> <example> - <title>Définition d'une fonction</title> + <title>Pseudo code pour illustrer l'usage d'une fonction</title> <programlisting role="php"> <![CDATA[ <?php @@ -27,9 +27,10 @@ </programlisting> </example> </para> + <simpara> Tout code &php;, correct syntaxiquement, peut apparaître - dans une fonction et dans une définition de + dans une fonction et dans des définitions de <link linkend="keyword.class">classe</link>. </simpara> <para> @@ -93,9 +94,9 @@ <programlisting role="php"> <![CDATA[ <?php -function foo() +function foo() { - function bar() + function bar() { echo "Je n'existe pas tant que foo() n'est pas appelé.\n"; } @@ -112,7 +113,7 @@ bar(); -?> +?> ]]> </programlisting> </example> @@ -163,10 +164,12 @@ </programlisting> </example> </para> - </sect1> + </sect1> + <sect1 xml:id="functions.arguments"> <title>Les arguments de fonction</title> + <simpara> Des informations peuvent être passées à une fonction en utilisant une liste d'arguments, dont chaque @@ -197,17 +200,15 @@ </programlisting> </example> </para> - + <sect2 xml:id="functions.arguments.by-reference"> <title>Passage d'arguments par référence</title> + <simpara> Par défaut, les arguments sont passés - à la fonction par valeur (donc vous pouvez - changer la valeur d'un argument dans la fonction, cela ne - change pas sa valeur à l'extérieur de la - fonction). Si vous voulez que vos fonctions puissent - changer la valeur des arguments, vous devez passer ces - arguments par référence. + à la fonction par valeur (Ainsi changer la valeur d'un argument dans la fonction ne + change pas sa valeur à l'extérieur de la fonction). Si vous voulez que vos fonctions + puissent changer la valeur des arguments, vous devez passer ces arguments par référence. </simpara> <para> Si vous voulez qu'un argument soit toujours passé @@ -232,10 +233,12 @@ </programlisting> </example> </para> + </sect2> - + <sect2 xml:id="functions.arguments.default"> <title>Valeur par défaut des arguments</title> + <para> Vous pouvez définir comme en C++ des valeurs par défaut pour les arguments de type scalaire : @@ -258,8 +261,10 @@ </programlisting> </example> </para> - - &example.outputs; + + <para> + Le résultat du code ci-dessus est : + </para> <para> <screen> Servir un cappuccino. @@ -268,7 +273,7 @@ </screen> </para> <para> - &php; vous autorise à utiliser des tableaux ainsi que le type spécial + &php; vous autorise à utiliser des tableaux (<type>array</type>) ainsi que le type spécial &null; comme valeur par défaut, par exemple : </para> <para> @@ -288,7 +293,7 @@ ]]> </programlisting> </example> - + </para> <simpara> La valeur par défaut d'un argument doit @@ -301,10 +306,10 @@ les premiers doivent être placés à la suite de tous les paramètres sans valeur par défaut. Sinon, cela ne fonctionnera pas. Considérons le code suivant : - <example> - <title> - Les arguments à valeur par défaut doivent être en premier : erreur - </title> + </para> + <para> + <example> + <title>Les arguments à valeur par défaut doivent être en premier : erreur</title> <programlisting role="php"> <![CDATA[ <?php @@ -312,17 +317,20 @@ { return "Préparer un bol de $type $flavour.\n"; } - + echo faireunyaourt("framboise"); // ne fonctionne pas comme voulu ?> ]]> </programlisting> </example> </para> - &example.outputs; + + <para> + Le résultat du code ci-dessus est : + </para> <para> <screen> -Warning: Missing argument 2 in call to makeyogurt() in +Warning: Missing argument 2 in call to makeyogurt() in /usr/local/etc/httpd/htdocs/phptest/functest.html on line 41 Préparer un bol de framboise. </screen> @@ -333,9 +341,7 @@ </para> <para> <example> - <title> - Les arguments à valeur par défaut doivent être en premier : valide - </title> + <title>Les arguments à valeur par défaut doivent être en premier : valide</title> <programlisting role="php"> <![CDATA[ <?php @@ -343,28 +349,34 @@ { return "Préparer un bol de $type $flavour.\n"; } - + echo faireunyaourt ("framboise"); // fonctionne comme voulu ?> ]]> </programlisting> </example> </para> - &example.outputs; + + <para> + Le résultat du code ci-dessus est : + </para> <para> <screen> Préparer un bol de acidophilus framboise. </screen> </para> + <note> <simpara> Depuis &php; 5, les valeurs par défaut peuvent être passées par référence. </simpara> </note> + </sect2> <sect2 xml:id="functions.variable-arg-list"> <title>Nombre d'arguments variable</title> + <simpara> &php; 4 et suivants supportent les fonctions à nombre d'arguments variable. C'est très simple à utiliser, avec les fonctions @@ -372,17 +384,21 @@ <function>func_get_arg</function> et <function>func_get_args</function>. </simpara> + <simpara> Aucune syntaxe particulière n'est nécessaire, et la liste d'argument doit toujours être fournie explicitement avec la définition de la fonction, et se comportera normalement. </simpara> + </sect2> - </sect1> + </sect1> + <sect1 xml:id="functions.returning-values"> <title>Les valeurs de retour</title> + <para> Les valeurs sont renvoyées en utilisant une instruction de retour optionnelle. Tous les types de variables @@ -407,8 +423,9 @@ </programlisting> </example> </para> + <para> - Vous ne pouvez pas renvoyer plusieurs valeurs en même temps, mais + Une fonction ne peut pas renvoyer plusieurs valeurs en même temps, mais vous pouvez obtenir le même résultat en renvoyant un tableau. </para> <para> @@ -454,9 +471,10 @@ linkend="language.references">l'explication sur les références</link>. </simpara> </sect1> - + <sect1 xml:id="functions.variable-functions"> <title>Fonctions variables</title> + <para> &php; supporte le concept de fonctions variables. Cela signifie que si le nom d'une variable est suivi de parenthèses, @@ -484,7 +502,7 @@ echo "dans foo()<br />\n"; } -function bar($arg = '' ) +function bar($arg = '') { echo "Dans bar(); l'argument était '$arg'.<br />\n"; } @@ -496,13 +514,13 @@ } $func = 'foo'; -$func(); // Appel foo() +$func(); // Appel foo() $func = 'bar'; -$func( 'test' ); // Appel bar() +$func('test'); // Appel bar() $func = 'echoit'; -$func('test'); // Appel echoit() +$func('test'); // Appel echoit() ?> ]]> </programlisting> @@ -523,7 +541,7 @@ $name = 'Bar'; $this->$name(); // Appelle la méthode Bar() } - + function Bar() { echo "C'est Bar"; @@ -546,9 +564,10 @@ <function>function_exists</function>. </para> </sect1> - + <sect1 xml:id="functions.internal"> <title>Fonctions internes</title> + <para> &php; dispose de nombreuses fonctions et structures standards. Il y a aussi des fonctions qui requièrent des extensions spécifiques de &php;, sans @@ -602,22 +621,26 @@ <function>dl</function>. </para> </sect1> - </chapter> - <!-- Keep this comment at the end of the file - Local variables: - mode: sgml - sgml-omittag:t - sgml-shorttag:t - sgml-minimize-attributes:nil - sgml-always-quote-attributes:t - sgml-indent-step:1 - sgml-indent-data:t + </chapter> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t indent-tabs-mode:nil - sgml-parent-document:nil - sgml-default-dtd-file:"../../manual.ced" - sgml-exposed-tags:nil - sgml-local-catalogs:nil - sgml-local-ecat-files:nil - End: - --> \ No newline at end of file +sgml-parent-document:nil +sgml-default-dtd-file:"../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> http://cvs.php.net/viewvc.cgi/phpdoc-fr/appendices/timezones.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-fr/appendices/timezones.xml diff -u phpdoc-fr/appendices/timezones.xml:1.6 phpdoc-fr/appendices/timezones.xml:1.7 --- phpdoc-fr/appendices/timezones.xml:1.6 Fri Mar 7 16:13:47 2008 +++ phpdoc-fr/appendices/timezones.xml Wed Apr 2 15:10:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <appendix xml:id="timezones" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -14,7 +14,7 @@ La dernière version de la base de données des fuseaux horaires peut être installée via la commande PECL <link xlink:href="&url.pecl.package.get;timezonedb">timezonedb</link>. - Pour les utilisateurs de WIndows, une bibliothèque pré-compilée DLL + Pour les utilisateurs de Windows, une bibliothèque pré-compilée DLL peut être téléchargée depuis le site PECL4Win : <link xlink:href="&url.pecl.timezonedb.dll;">php_timezonedb.dll</link>. </simpara> @@ -133,203 +133,203 @@ <entry>America/Argentina/Mendoza</entry> <entry>America/Argentina/Rio_Gallegos</entry> <entry>America/Argentina/San_Juan</entry> - <entry>America/Argentina/Tucuman</entry> + <entry>America/Argentina/San_Luis</entry> </row> <row> + <entry>America/Argentina/Tucuman</entry> <entry>America/Argentina/Ushuaia</entry> <entry>America/Aruba</entry> <entry>America/Asuncion</entry> <entry>America/Atikokan</entry> - <entry>America/Atka</entry> </row> <row> + <entry>America/Atka</entry> <entry>America/Bahia</entry> <entry>America/Barbados</entry> <entry>America/Belem</entry> <entry>America/Belize</entry> - <entry>America/Blanc-Sablon</entry> </row> <row> + <entry>America/Blanc-Sablon</entry> <entry>America/Boa_Vista</entry> <entry>America/Bogota</entry> <entry>America/Boise</entry> <entry>America/Buenos_Aires</entry> - <entry>America/Cambridge_Bay</entry> </row> <row> + <entry>America/Cambridge_Bay</entry> <entry>America/Campo_Grande</entry> <entry>America/Cancun</entry> <entry>America/Caracas</entry> <entry>America/Catamarca</entry> - <entry>America/Cayenne</entry> </row> <row> + <entry>America/Cayenne</entry> <entry>America/Cayman</entry> <entry>America/Chicago</entry> <entry>America/Chihuahua</entry> <entry>America/Coral_Harbour</entry> - <entry>America/Cordoba</entry> </row> <row> + <entry>America/Cordoba</entry> <entry>America/Costa_Rica</entry> <entry>America/Cuiaba</entry> <entry>America/Curacao</entry> <entry>America/Danmarkshavn</entry> - <entry>America/Dawson</entry> </row> <row> + <entry>America/Dawson</entry> <entry>America/Dawson_Creek</entry> <entry>America/Denver</entry> <entry>America/Detroit</entry> <entry>America/Dominica</entry> - <entry>America/Edmonton</entry> </row> <row> + <entry>America/Edmonton</entry> <entry>America/Eirunepe</entry> <entry>America/El_Salvador</entry> <entry>America/Ensenada</entry> <entry>America/Fort_Wayne</entry> - <entry>America/Fortaleza</entry> </row> <row> + <entry>America/Fortaleza</entry> <entry>America/Glace_Bay</entry> <entry>America/Godthab</entry> <entry>America/Goose_Bay</entry> <entry>America/Grand_Turk</entry> - <entry>America/Grenada</entry> </row> <row> + <entry>America/Grenada</entry> <entry>America/Guadeloupe</entry> <entry>America/Guatemala</entry> <entry>America/Guayaquil</entry> <entry>America/Guyana</entry> - <entry>America/Halifax</entry> </row> <row> + <entry>America/Halifax</entry> <entry>America/Havana</entry> <entry>America/Hermosillo</entry> <entry>America/Indiana/Indianapolis</entry> <entry>America/Indiana/Knox</entry> - <entry>America/Indiana/Marengo</entry> </row> <row> + <entry>America/Indiana/Marengo</entry> <entry>America/Indiana/Petersburg</entry> <entry>America/Indiana/Tell_City</entry> <entry>America/Indiana/Vevay</entry> <entry>America/Indiana/Vincennes</entry> - <entry>America/Indiana/Winamac</entry> </row> <row> + <entry>America/Indiana/Winamac</entry> <entry>America/Indianapolis</entry> <entry>America/Inuvik</entry> <entry>America/Iqaluit</entry> <entry>America/Jamaica</entry> - <entry>America/Jujuy</entry> </row> <row> + <entry>America/Jujuy</entry> <entry>America/Juneau</entry> <entry>America/Kentucky/Louisville</entry> <entry>America/Kentucky/Monticello</entry> <entry>America/Knox_IN</entry> - <entry>America/La_Paz</entry> </row> <row> + <entry>America/La_Paz</entry> <entry>America/Lima</entry> <entry>America/Los_Angeles</entry> <entry>America/Louisville</entry> <entry>America/Maceio</entry> - <entry>America/Managua</entry> </row> <row> + <entry>America/Managua</entry> <entry>America/Manaus</entry> <entry>America/Marigot</entry> <entry>America/Martinique</entry> <entry>America/Mazatlan</entry> - <entry>America/Mendoza</entry> </row> <row> + <entry>America/Mendoza</entry> <entry>America/Menominee</entry> <entry>America/Merida</entry> <entry>America/Mexico_City</entry> <entry>America/Miquelon</entry> - <entry>America/Moncton</entry> </row> <row> + <entry>America/Moncton</entry> <entry>America/Monterrey</entry> <entry>America/Montevideo</entry> <entry>America/Montreal</entry> <entry>America/Montserrat</entry> - <entry>America/Nassau</entry> </row> <row> + <entry>America/Nassau</entry> <entry>America/New_York</entry> <entry>America/Nipigon</entry> <entry>America/Nome</entry> <entry>America/Noronha</entry> - <entry>America/North_Dakota/Center</entry> </row> <row> + <entry>America/North_Dakota/Center</entry> <entry>America/North_Dakota/New_Salem</entry> <entry>America/Panama</entry> <entry>America/Pangnirtung</entry> <entry>America/Paramaribo</entry> - <entry>America/Phoenix</entry> </row> <row> + <entry>America/Phoenix</entry> <entry>America/Port-au-Prince</entry> <entry>America/Port_of_Spain</entry> <entry>America/Porto_Acre</entry> <entry>America/Porto_Velho</entry> - <entry>America/Puerto_Rico</entry> </row> <row> + <entry>America/Puerto_Rico</entry> <entry>America/Rainy_River</entry> <entry>America/Rankin_Inlet</entry> <entry>America/Recife</entry> <entry>America/Regina</entry> - <entry>America/Resolute</entry> </row> <row> + <entry>America/Resolute</entry> <entry>America/Rio_Branco</entry> <entry>America/Rosario</entry> <entry>America/Santiago</entry> <entry>America/Santo_Domingo</entry> - <entry>America/Sao_Paulo</entry> </row> <row> + <entry>America/Sao_Paulo</entry> <entry>America/Scoresbysund</entry> <entry>America/Shiprock</entry> <entry>America/St_Barthelemy</entry> <entry>America/St_Johns</entry> - <entry>America/St_Kitts</entry> </row> <row> + <entry>America/St_Kitts</entry> <entry>America/St_Lucia</entry> <entry>America/St_Thomas</entry> <entry>America/St_Vincent</entry> <entry>America/Swift_Current</entry> - <entry>America/Tegucigalpa</entry> </row> <row> + <entry>America/Tegucigalpa</entry> <entry>America/Thule</entry> <entry>America/Thunder_Bay</entry> <entry>America/Tijuana</entry> <entry>America/Toronto</entry> - <entry>America/Tortola</entry> </row> <row> + <entry>America/Tortola</entry> <entry>America/Vancouver</entry> <entry>America/Virgin</entry> <entry>America/Whitehorse</entry> <entry>America/Winnipeg</entry> - <entry>America/Yakutat</entry> </row> <row> + <entry>America/Yakutat</entry> <entry>America/Yellowknife</entry> <entry></entry> <entry></entry> <entry></entry> - <entry></entry> </row> </tbody> </tgroup> @@ -420,85 +420,92 @@ <entry>Asia/Dushanbe</entry> <entry>Asia/Gaza</entry> <entry>Asia/Harbin</entry> + <entry>Asia/Ho_Chi_Minh</entry> <entry>Asia/Hong_Kong</entry> - <entry>Asia/Hovd</entry> </row> <row> + <entry>Asia/Hovd</entry> <entry>Asia/Irkutsk</entry> <entry>Asia/Istanbul</entry> <entry>Asia/Jakarta</entry> <entry>Asia/Jayapura</entry> - <entry>Asia/Jerusalem</entry> </row> <row> + <entry>Asia/Jerusalem</entry> <entry>Asia/Kabul</entry> <entry>Asia/Kamchatka</entry> <entry>Asia/Karachi</entry> <entry>Asia/Kashgar</entry> - <entry>Asia/Katmandu</entry> </row> <row> + <entry>Asia/Katmandu</entry> + <entry>Asia/Kolkata</entry> <entry>Asia/Krasnoyarsk</entry> <entry>Asia/Kuala_Lumpur</entry> <entry>Asia/Kuching</entry> - <entry>Asia/Kuwait</entry> - <entry>Asia/Macao</entry> </row> <row> + <entry>Asia/Kuwait</entry> + <entry>Asia/Macao</entry> <entry>Asia/Macau</entry> <entry>Asia/Magadan</entry> <entry>Asia/Makassar</entry> - <entry>Asia/Manila</entry> - <entry>Asia/Muscat</entry> </row> <row> + <entry>Asia/Manila</entry> + <entry>Asia/Muscat</entry> <entry>Asia/Nicosia</entry> <entry>Asia/Novosibirsk</entry> <entry>Asia/Omsk</entry> - <entry>Asia/Oral</entry> - <entry>Asia/Phnom_Penh</entry> </row> <row> + <entry>Asia/Oral</entry> + <entry>Asia/Phnom_Penh</entry> <entry>Asia/Pontianak</entry> <entry>Asia/Pyongyang</entry> <entry>Asia/Qatar</entry> - <entry>Asia/Qyzylorda</entry> - <entry>Asia/Rangoon</entry> </row> <row> + <entry>Asia/Qyzylorda</entry> + <entry>Asia/Rangoon</entry> <entry>Asia/Riyadh</entry> <entry>Asia/Saigon</entry> <entry>Asia/Sakhalin</entry> - <entry>Asia/Samarkand</entry> - <entry>Asia/Seoul</entry> </row> <row> + <entry>Asia/Samarkand</entry> + <entry>Asia/Seoul</entry> <entry>Asia/Shanghai</entry> <entry>Asia/Singapore</entry> <entry>Asia/Taipei</entry> - <entry>Asia/Tashkent</entry> - <entry>Asia/Tbilisi</entry> </row> <row> + <entry>Asia/Tashkent</entry> + <entry>Asia/Tbilisi</entry> <entry>Asia/Tehran</entry> <entry>Asia/Tel_Aviv</entry> <entry>Asia/Thimbu</entry> - <entry>Asia/Thimphu</entry> - <entry>Asia/Tokyo</entry> </row> <row> + <entry>Asia/Thimphu</entry> + <entry>Asia/Tokyo</entry> <entry>Asia/Ujung_Pandang</entry> <entry>Asia/Ulaanbaatar</entry> <entry>Asia/Ulan_Bator</entry> - <entry>Asia/Urumqi</entry> - <entry>Asia/Vientiane</entry> </row> <row> + <entry>Asia/Urumqi</entry> + <entry>Asia/Vientiane</entry> <entry>Asia/Vladivostok</entry> <entry>Asia/Yakutsk</entry> <entry>Asia/Yekaterinburg</entry> + </row> + <row> <entry>Asia/Yerevan</entry> <entry></entry> + <entry></entry> + <entry></entry> + <entry></entry> </row> </tbody> </tgroup> @@ -949,7 +956,7 @@ </table> <warning> <simpara> - N'utilisez aucun des fuseaux horaires listés ici, ils n'existent que pour + N'utilisez aucun des fuseaux horaires listés ici (à côté de UTC), ils n'existent que pour des raisons de compatibilité ascendante. </simpara> </warning> @@ -975,4 +982,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=php vi: ts=4 sw=1 ---> \ No newline at end of file +-->
http://cvs.php.net/viewvc.cgi/phpdoc-fr/language/functions.xml?r1=1.49&r2=1.50&diff_format=u Index: phpdoc-fr/language/functions.xml diff -u phpdoc-fr/language/functions.xml:1.49 phpdoc-fr/language/functions.xml:1.50 --- phpdoc-fr/language/functions.xml:1.49 Sun Feb 24 10:11:55 2008 +++ phpdoc-fr/language/functions.xml Wed Apr 2 15:10:17 2008 @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.49 $ --> -<!-- EN-Revision: 1.66 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.50 $ --> +<!-- EN-Revision: 1.69 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - <chapter xml:id="language.functions" xmlns="http://docbook.org/ns/docbook"> <title>Les fonctions</title> <sect1 xml:id="functions.user-defined"> - <title>Les fonctions</title> + <title>Les fonctions définies par l'utilisateur</title> + <para> Une fonction peut être définie en utilisant la syntaxe suivante : </para> <para> <example> - <title>Définition d'une fonction</title> + <title>Pseudo code pour illustrer l'usage d'une fonction</title> <programlisting role="php"> <![CDATA[ <?php @@ -27,9 +27,10 @@ </programlisting> </example> </para> + <simpara> Tout code &php;, correct syntaxiquement, peut apparaître - dans une fonction et dans une définition de + dans une fonction et dans des définitions de <link linkend="keyword.class">classe</link>. </simpara> <para> @@ -93,9 +94,9 @@ <programlisting role="php"> <![CDATA[ <?php -function foo() +function foo() { - function bar() + function bar() { echo "Je n'existe pas tant que foo() n'est pas appelé.\n"; } @@ -112,7 +113,7 @@ bar(); -?> +?> ]]> </programlisting> </example> @@ -163,10 +164,12 @@ </programlisting> </example> </para> - </sect1> + </sect1> + <sect1 xml:id="functions.arguments"> <title>Les arguments de fonction</title> + <simpara> Des informations peuvent être passées à une fonction en utilisant une liste d'arguments, dont chaque @@ -197,17 +200,15 @@ </programlisting> </example> </para> - + <sect2 xml:id="functions.arguments.by-reference"> <title>Passage d'arguments par référence</title> + <simpara> Par défaut, les arguments sont passés - à la fonction par valeur (donc vous pouvez - changer la valeur d'un argument dans la fonction, cela ne - change pas sa valeur à l'extérieur de la - fonction). Si vous voulez que vos fonctions puissent - changer la valeur des arguments, vous devez passer ces - arguments par référence. + à la fonction par valeur (Ainsi changer la valeur d'un argument dans la fonction ne + change pas sa valeur à l'extérieur de la fonction). Si vous voulez que vos fonctions + puissent changer la valeur des arguments, vous devez passer ces arguments par référence. </simpara> <para> Si vous voulez qu'un argument soit toujours passé @@ -232,10 +233,12 @@ </programlisting> </example> </para> + </sect2> - + <sect2 xml:id="functions.arguments.default"> <title>Valeur par défaut des arguments</title> + <para> Vous pouvez définir comme en C++ des valeurs par défaut pour les arguments de type scalaire : @@ -258,8 +261,10 @@ </programlisting> </example> </para> - - &example.outputs; + + <para> + Le résultat du code ci-dessus est : + </para> <para> <screen> Servir un cappuccino. @@ -268,7 +273,7 @@ </screen> </para> <para> - &php; vous autorise à utiliser des tableaux ainsi que le type spécial + &php; vous autorise à utiliser des tableaux (<type>array</type>) ainsi que le type spécial &null; comme valeur par défaut, par exemple : </para> <para> @@ -288,7 +293,7 @@ ]]> </programlisting> </example> - + </para> <simpara> La valeur par défaut d'un argument doit @@ -301,10 +306,10 @@ les premiers doivent être placés à la suite de tous les paramètres sans valeur par défaut. Sinon, cela ne fonctionnera pas. Considérons le code suivant : - <example> - <title> - Les arguments à valeur par défaut doivent être en premier : erreur - </title> + </para> + <para> + <example> + <title>Les arguments à valeur par défaut doivent être en premier : erreur</title> <programlisting role="php"> <![CDATA[ <?php @@ -312,17 +317,20 @@ { return "Préparer un bol de $type $flavour.\n"; } - + echo faireunyaourt("framboise"); // ne fonctionne pas comme voulu ?> ]]> </programlisting> </example> </para> - &example.outputs; + + <para> + Le résultat du code ci-dessus est : + </para> <para> <screen> -Warning: Missing argument 2 in call to makeyogurt() in +Warning: Missing argument 2 in call to makeyogurt() in /usr/local/etc/httpd/htdocs/phptest/functest.html on line 41 Préparer un bol de framboise. </screen> @@ -333,9 +341,7 @@ </para> <para> <example> - <title> - Les arguments à valeur par défaut doivent être en premier : valide - </title> + <title>Les arguments à valeur par défaut doivent être en premier : valide</title> <programlisting role="php"> <![CDATA[ <?php @@ -343,28 +349,34 @@ { return "Préparer un bol de $type $flavour.\n"; } - + echo faireunyaourt ("framboise"); // fonctionne comme voulu ?> ]]> </programlisting> </example> </para> - &example.outputs; + + <para> + Le résultat du code ci-dessus est : + </para> <para> <screen> Préparer un bol de acidophilus framboise. </screen> </para> + <note> <simpara> Depuis &php; 5, les valeurs par défaut peuvent être passées par référence. </simpara> </note> + </sect2> <sect2 xml:id="functions.variable-arg-list"> <title>Nombre d'arguments variable</title> + <simpara> &php; 4 et suivants supportent les fonctions à nombre d'arguments variable. C'est très simple à utiliser, avec les fonctions @@ -372,17 +384,21 @@ <function>func_get_arg</function> et <function>func_get_args</function>. </simpara> + <simpara> Aucune syntaxe particulière n'est nécessaire, et la liste d'argument doit toujours être fournie explicitement avec la définition de la fonction, et se comportera normalement. </simpara> + </sect2> - </sect1> + </sect1> + <sect1 xml:id="functions.returning-values"> <title>Les valeurs de retour</title> + <para> Les valeurs sont renvoyées en utilisant une instruction de retour optionnelle. Tous les types de variables @@ -407,8 +423,9 @@ </programlisting> </example> </para> + <para> - Vous ne pouvez pas renvoyer plusieurs valeurs en même temps, mais + Une fonction ne peut pas renvoyer plusieurs valeurs en même temps, mais vous pouvez obtenir le même résultat en renvoyant un tableau. </para> <para> @@ -454,9 +471,10 @@ linkend="language.references">l'explication sur les références</link>. </simpara> </sect1> - + <sect1 xml:id="functions.variable-functions"> <title>Fonctions variables</title> + <para> &php; supporte le concept de fonctions variables. Cela signifie que si le nom d'une variable est suivi de parenthèses, @@ -484,7 +502,7 @@ echo "dans foo()<br />\n"; } -function bar($arg = '' ) +function bar($arg = '') { echo "Dans bar(); l'argument était '$arg'.<br />\n"; } @@ -496,13 +514,13 @@ } $func = 'foo'; -$func(); // Appel foo() +$func(); // Appel foo() $func = 'bar'; -$func( 'test' ); // Appel bar() +$func('test'); // Appel bar() $func = 'echoit'; -$func('test'); // Appel echoit() +$func('test'); // Appel echoit() ?> ]]> </programlisting> @@ -523,7 +541,7 @@ $name = 'Bar'; $this->$name(); // Appelle la méthode Bar() } - + function Bar() { echo "C'est Bar"; @@ -546,9 +564,10 @@ <function>function_exists</function>. </para> </sect1> - + <sect1 xml:id="functions.internal"> <title>Fonctions internes</title> + <para> &php; dispose de nombreuses fonctions et structures standards. Il y a aussi des fonctions qui requièrent des extensions spécifiques de &php;, sans @@ -602,22 +621,26 @@ <function>dl</function>. </para> </sect1> - </chapter> - <!-- Keep this comment at the end of the file - Local variables: - mode: sgml - sgml-omittag:t - sgml-shorttag:t - sgml-minimize-attributes:nil - sgml-always-quote-attributes:t - sgml-indent-step:1 - sgml-indent-data:t + </chapter> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t indent-tabs-mode:nil - sgml-parent-document:nil - sgml-default-dtd-file:"../../manual.ced" - sgml-exposed-tags:nil - sgml-local-catalogs:nil - sgml-local-ecat-files:nil - End: - --> \ No newline at end of file +sgml-parent-document:nil +sgml-default-dtd-file:"../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> http://cvs.php.net/viewvc.cgi/phpdoc-fr/appendices/timezones.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-fr/appendices/timezones.xml diff -u phpdoc-fr/appendices/timezones.xml:1.6 phpdoc-fr/appendices/timezones.xml:1.7 --- phpdoc-fr/appendices/timezones.xml:1.6 Fri Mar 7 16:13:47 2008 +++ phpdoc-fr/appendices/timezones.xml Wed Apr 2 15:10:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <appendix xml:id="timezones" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -14,7 +14,7 @@ La dernière version de la base de données des fuseaux horaires peut être installée via la commande PECL <link xlink:href="&url.pecl.package.get;timezonedb">timezonedb</link>. - Pour les utilisateurs de WIndows, une bibliothèque pré-compilée DLL + Pour les utilisateurs de Windows, une bibliothèque pré-compilée DLL peut être téléchargée depuis le site PECL4Win : <link xlink:href="&url.pecl.timezonedb.dll;">php_timezonedb.dll</link>. </simpara> @@ -133,203 +133,203 @@ <entry>America/Argentina/Mendoza</entry> <entry>America/Argentina/Rio_Gallegos</entry> <entry>America/Argentina/San_Juan</entry> - <entry>America/Argentina/Tucuman</entry> + <entry>America/Argentina/San_Luis</entry> </row> <row> + <entry>America/Argentina/Tucuman</entry> <entry>America/Argentina/Ushuaia</entry> <entry>America/Aruba</entry> <entry>America/Asuncion</entry> <entry>America/Atikokan</entry> - <entry>America/Atka</entry> </row> <row> + <entry>America/Atka</entry> <entry>America/Bahia</entry> <entry>America/Barbados</entry> <entry>America/Belem</entry> <entry>America/Belize</entry> - <entry>America/Blanc-Sablon</entry> </row> <row> + <entry>America/Blanc-Sablon</entry> <entry>America/Boa_Vista</entry> <entry>America/Bogota</entry> <entry>America/Boise</entry> <entry>America/Buenos_Aires</entry> - <entry>America/Cambridge_Bay</entry> </row> <row> + <entry>America/Cambridge_Bay</entry> <entry>America/Campo_Grande</entry> <entry>America/Cancun</entry> <entry>America/Caracas</entry> <entry>America/Catamarca</entry> - <entry>America/Cayenne</entry> </row> <row> + <entry>America/Cayenne</entry> <entry>America/Cayman</entry> <entry>America/Chicago</entry> <entry>America/Chihuahua</entry> <entry>America/Coral_Harbour</entry> - <entry>America/Cordoba</entry> </row> <row> + <entry>America/Cordoba</entry> <entry>America/Costa_Rica</entry> <entry>America/Cuiaba</entry> <entry>America/Curacao</entry> <entry>America/Danmarkshavn</entry> - <entry>America/Dawson</entry> </row> <row> + <entry>America/Dawson</entry> <entry>America/Dawson_Creek</entry> <entry>America/Denver</entry> <entry>America/Detroit</entry> <entry>America/Dominica</entry> - <entry>America/Edmonton</entry> </row> <row> + <entry>America/Edmonton</entry> <entry>America/Eirunepe</entry> <entry>America/El_Salvador</entry> <entry>America/Ensenada</entry> <entry>America/Fort_Wayne</entry> - <entry>America/Fortaleza</entry> </row> <row> + <entry>America/Fortaleza</entry> <entry>America/Glace_Bay</entry> <entry>America/Godthab</entry> <entry>America/Goose_Bay</entry> <entry>America/Grand_Turk</entry> - <entry>America/Grenada</entry> </row> <row> + <entry>America/Grenada</entry> <entry>America/Guadeloupe</entry> <entry>America/Guatemala</entry> <entry>America/Guayaquil</entry> <entry>America/Guyana</entry> - <entry>America/Halifax</entry> </row> <row> + <entry>America/Halifax</entry> <entry>America/Havana</entry> <entry>America/Hermosillo</entry> <entry>America/Indiana/Indianapolis</entry> <entry>America/Indiana/Knox</entry> - <entry>America/Indiana/Marengo</entry> </row> <row> + <entry>America/Indiana/Marengo</entry> <entry>America/Indiana/Petersburg</entry> <entry>America/Indiana/Tell_City</entry> <entry>America/Indiana/Vevay</entry> <entry>America/Indiana/Vincennes</entry> - <entry>America/Indiana/Winamac</entry> </row> <row> + <entry>America/Indiana/Winamac</entry> <entry>America/Indianapolis</entry> <entry>America/Inuvik</entry> <entry>America/Iqaluit</entry> <entry>America/Jamaica</entry> - <entry>America/Jujuy</entry> </row> <row> + <entry>America/Jujuy</entry> <entry>America/Juneau</entry> <entry>America/Kentucky/Louisville</entry> <entry>America/Kentucky/Monticello</entry> <entry>America/Knox_IN</entry> - <entry>America/La_Paz</entry> </row> <row> + <entry>America/La_Paz</entry> <entry>America/Lima</entry> <entry>America/Los_Angeles</entry> <entry>America/Louisville</entry> <entry>America/Maceio</entry> - <entry>America/Managua</entry> </row> <row> + <entry>America/Managua</entry> <entry>America/Manaus</entry> <entry>America/Marigot</entry> <entry>America/Martinique</entry> <entry>America/Mazatlan</entry> - <entry>America/Mendoza</entry> </row> <row> + <entry>America/Mendoza</entry> <entry>America/Menominee</entry> <entry>America/Merida</entry> <entry>America/Mexico_City</entry> <entry>America/Miquelon</entry> - <entry>America/Moncton</entry> </row> <row> + <entry>America/Moncton</entry> <entry>America/Monterrey</entry> <entry>America/Montevideo</entry> <entry>America/Montreal</entry> <entry>America/Montserrat</entry> - <entry>America/Nassau</entry> </row> <row> + <entry>America/Nassau</entry> <entry>America/New_York</entry> <entry>America/Nipigon</entry> <entry>America/Nome</entry> <entry>America/Noronha</entry> - <entry>America/North_Dakota/Center</entry> </row> <row> + <entry>America/North_Dakota/Center</entry> <entry>America/North_Dakota/New_Salem</entry> <entry>America/Panama</entry> <entry>America/Pangnirtung</entry> <entry>America/Paramaribo</entry> - <entry>America/Phoenix</entry> </row> <row> + <entry>America/Phoenix</entry> <entry>America/Port-au-Prince</entry> <entry>America/Port_of_Spain</entry> <entry>America/Porto_Acre</entry> <entry>America/Porto_Velho</entry> - <entry>America/Puerto_Rico</entry> </row> <row> + <entry>America/Puerto_Rico</entry> <entry>America/Rainy_River</entry> <entry>America/Rankin_Inlet</entry> <entry>America/Recife</entry> <entry>America/Regina</entry> - <entry>America/Resolute</entry> </row> <row> + <entry>America/Resolute</entry> <entry>America/Rio_Branco</entry> <entry>America/Rosario</entry> <entry>America/Santiago</entry> <entry>America/Santo_Domingo</entry> - <entry>America/Sao_Paulo</entry> </row> <row> + <entry>America/Sao_Paulo</entry> <entry>America/Scoresbysund</entry> <entry>America/Shiprock</entry> <entry>America/St_Barthelemy</entry> <entry>America/St_Johns</entry> - <entry>America/St_Kitts</entry> </row> <row> + <entry>America/St_Kitts</entry> <entry>America/St_Lucia</entry> <entry>America/St_Thomas</entry> <entry>America/St_Vincent</entry> <entry>America/Swift_Current</entry> - <entry>America/Tegucigalpa</entry> </row> <row> + <entry>America/Tegucigalpa</entry> <entry>America/Thule</entry> <entry>America/Thunder_Bay</entry> <entry>America/Tijuana</entry> <entry>America/Toronto</entry> - <entry>America/Tortola</entry> </row> <row> + <entry>America/Tortola</entry> <entry>America/Vancouver</entry> <entry>America/Virgin</entry> <entry>America/Whitehorse</entry> <entry>America/Winnipeg</entry> - <entry>America/Yakutat</entry> </row> <row> + <entry>America/Yakutat</entry> <entry>America/Yellowknife</entry> <entry></entry> <entry></entry> <entry></entry> - <entry></entry> </row> </tbody> </tgroup> @@ -420,85 +420,92 @@ <entry>Asia/Dushanbe</entry> <entry>Asia/Gaza</entry> <entry>Asia/Harbin</entry> + <entry>Asia/Ho_Chi_Minh</entry> <entry>Asia/Hong_Kong</entry> - <entry>Asia/Hovd</entry> </row> <row> + <entry>Asia/Hovd</entry> <entry>Asia/Irkutsk</entry> <entry>Asia/Istanbul</entry> <entry>Asia/Jakarta</entry> <entry>Asia/Jayapura</entry> - <entry>Asia/Jerusalem</entry> </row> <row> + <entry>Asia/Jerusalem</entry> <entry>Asia/Kabul</entry> <entry>Asia/Kamchatka</entry> <entry>Asia/Karachi</entry> <entry>Asia/Kashgar</entry> - <entry>Asia/Katmandu</entry> </row> <row> + <entry>Asia/Katmandu</entry> + <entry>Asia/Kolkata</entry> <entry>Asia/Krasnoyarsk</entry> <entry>Asia/Kuala_Lumpur</entry> <entry>Asia/Kuching</entry> - <entry>Asia/Kuwait</entry> - <entry>Asia/Macao</entry> </row> <row> + <entry>Asia/Kuwait</entry> + <entry>Asia/Macao</entry> <entry>Asia/Macau</entry> <entry>Asia/Magadan</entry> <entry>Asia/Makassar</entry> - <entry>Asia/Manila</entry> - <entry>Asia/Muscat</entry> </row> <row> + <entry>Asia/Manila</entry> + <entry>Asia/Muscat</entry> <entry>Asia/Nicosia</entry> <entry>Asia/Novosibirsk</entry> <entry>Asia/Omsk</entry> - <entry>Asia/Oral</entry> - <entry>Asia/Phnom_Penh</entry> </row> <row> + <entry>Asia/Oral</entry> + <entry>Asia/Phnom_Penh</entry> <entry>Asia/Pontianak</entry> <entry>Asia/Pyongyang</entry> <entry>Asia/Qatar</entry> - <entry>Asia/Qyzylorda</entry> - <entry>Asia/Rangoon</entry> </row> <row> + <entry>Asia/Qyzylorda</entry> + <entry>Asia/Rangoon</entry> <entry>Asia/Riyadh</entry> <entry>Asia/Saigon</entry> <entry>Asia/Sakhalin</entry> - <entry>Asia/Samarkand</entry> - <entry>Asia/Seoul</entry> </row> <row> + <entry>Asia/Samarkand</entry> + <entry>Asia/Seoul</entry> <entry>Asia/Shanghai</entry> <entry>Asia/Singapore</entry> <entry>Asia/Taipei</entry> - <entry>Asia/Tashkent</entry> - <entry>Asia/Tbilisi</entry> </row> <row> + <entry>Asia/Tashkent</entry> + <entry>Asia/Tbilisi</entry> <entry>Asia/Tehran</entry> <entry>Asia/Tel_Aviv</entry> <entry>Asia/Thimbu</entry> - <entry>Asia/Thimphu</entry> - <entry>Asia/Tokyo</entry> </row> <row> + <entry>Asia/Thimphu</entry> + <entry>Asia/Tokyo</entry> <entry>Asia/Ujung_Pandang</entry> <entry>Asia/Ulaanbaatar</entry> <entry>Asia/Ulan_Bator</entry> - <entry>Asia/Urumqi</entry> - <entry>Asia/Vientiane</entry> </row> <row> + <entry>Asia/Urumqi</entry> + <entry>Asia/Vientiane</entry> <entry>Asia/Vladivostok</entry> <entry>Asia/Yakutsk</entry> <entry>Asia/Yekaterinburg</entry> + </row> + <row> <entry>Asia/Yerevan</entry> <entry></entry> + <entry></entry> + <entry></entry> + <entry></entry> </row> </tbody> </tgroup> @@ -949,7 +956,7 @@ </table> <warning> <simpara> - N'utilisez aucun des fuseaux horaires listés ici, ils n'existent que pour + N'utilisez aucun des fuseaux horaires listés ici (à côté de UTC), ils n'existent que pour des raisons de compatibilité ascendante. </simpara> </warning> @@ -975,4 +982,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=php vi: ts=4 sw=1 ---> \ No newline at end of file +-->