dams Sun Oct 28 11:43:15 2001 EDT
Modified files:
/phpdoc/fr/language functions.xml
Log:
Adding xml string.Updating with crowds of minors updates.Typos fixed.
Index: phpdoc/fr/language/functions.xml
diff -u phpdoc/fr/language/functions.xml:1.8 phpdoc/fr/language/functions.xml:1.9
--- phpdoc/fr/language/functions.xml:1.8 Fri Jul 20 03:56:11 2001
+++ phpdoc/fr/language/functions.xml Sun Oct 28 11:43:15 2001
@@ -1,3 +1,5 @@
+<?xml encoding="iso-8859-1"?>
+<!-- $Revision: 1.9 $ -->
<chapter id="function">
<title>Les fonctions</title>
<sect1 id="functions.user-defined">
@@ -60,9 +62,11 @@
un tableau comme argument :
<informalexample>
<programlisting role="php">
+<?php
function takes_array($input) {
echo "$input[0] + $input[1] = ", $input[0]+$input[1];
}
+?>
</programlisting>
</informalexample>
</para>
@@ -83,12 +87,14 @@
devant l'argument dans la déclaration de la fonction :
<informalexample>
<programlisting role="php">
+<?php
function add_some_extra(&$string) {
$string .= ', et un peu plus.';
}
$str = 'Ceci est une chaîne';
add_some_extra($str);
echo $str; // affiche 'Ceci est une chaîne, et un peu plus.'
+?>
</programlisting>
</informalexample>
</para>
@@ -99,6 +105,7 @@
devant l'argument dans l'appel de la fonction:
<informalexample>
<programlisting role="php">
+<?php
function foo ($bar) {
$bar .= ', et un peu plus.';
}
@@ -107,6 +114,7 @@
echo $str; // affiche 'Ceci est une chaîne'
foo (&$str);
echo $str; // affiche 'Ceci est une chaîne, et un peu plus.'
+?>
</programlisting>
</informalexample>
</para>
@@ -118,11 +126,13 @@
défaut pour les arguments de type scalaire :
<informalexample>
<programlisting role="php">
+<?php
function servir_apero ($type = "ricard") {
return "Servir un verre de $type.\n";
}
echo servir_apero();
echo servir_apero("whisky");
+?>
</programlisting>
</informalexample>
</para>