cvs: phpdoc-fr /language functions.xml operators.xml types.xml
| From: | Damien Seguy | Date: | Thu, 15 Apr 2004 21:23:20 +0000 |
| Subject: | cvs: phpdoc-fr /language functions.xml operators.xml types.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-2160@lists.php.net to get a copy of this message | ||
dams Thu Apr 15 17:23:20 2004 EDT
Modified files:
/phpdoc-fr/language functions.xml operators.xml types.xml
Log:
id synch
http://cvs.php.net/diff.php/phpdoc-fr/language/functions.xml?r1=1.22&r2=1.23&ty=u
Index: phpdoc-fr/language/functions.xml
diff -u phpdoc-fr/language/functions.xml:1.22 phpdoc-fr/language/functions.xml:1.23
--- phpdoc-fr/language/functions.xml:1.22 Wed Feb 25 09:26:34 2004
+++ phpdoc-fr/language/functions.xml Thu Apr 15 17:23:19 2004
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.22 $ -->
+<!-- $Revision: 1.23 $ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
- <chapter id="functions">
+ <chapter id="language.functions">
<title>Les fonctions</title>
<sect1 id="functions.user-defined">
<title>Les fonctions</title>
http://cvs.php.net/diff.php/phpdoc-fr/language/operators.xml?r1=1.32&r2=1.33&ty=u
Index: phpdoc-fr/language/operators.xml
diff -u phpdoc-fr/language/operators.xml:1.32 phpdoc-fr/language/operators.xml:1.33
--- phpdoc-fr/language/operators.xml:1.32 Wed Feb 25 09:07:19 2004
+++ phpdoc-fr/language/operators.xml Thu Apr 15 17:23:19 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.32 $ -->
+<!-- $Revision: 1.33 $ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<chapter id="language.operators">
<title>Les opérateurs</title>
@@ -748,7 +748,42 @@
</example>
</para>
</sect1>
- </chapter>
+ <sect1 id="language.operators.type">
+ <title>Opérateur de type</title>
+ <para>
+ &php; a un seul opérateur de type : <literal>instanceof</literal>.
+ <literal>instanceof</literal> sert à déterminer si un objet est
+ d'une <link linkend="language.oop">classe</link> donnée.
+ </para>
+ <simpara>
+ <literal>instanceof</literal> a été ajouté en &php; 5.
+ </simpara>
+ <example>
+ <title>Opérateur de type : <literal>instanceof</literal></title>
+ <programlisting>
+<![CDATA[
+<?php
+class A { }
+class B { }
+
+$thing = new A;
+
+if ($thing instanceof A) {
+ echo 'A';
+}
+if ($thing instanceof B) {
+ echo 'B';
+}
+?>
+]]>
+ </programlisting>
+ <simpara>
+ Comme <variable>$thing</variable> est un objet de type A, mais
+ pas B, seul le premier bloc de commande sera exécuté.
+ </simpara>
+ <screen>A</screen>
+ </example>
+ </sect1> </chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/diff.php/phpdoc-fr/language/types.xml?r1=1.36&r2=1.37&ty=u
Index: phpdoc-fr/language/types.xml
diff -u phpdoc-fr/language/types.xml:1.36 phpdoc-fr/language/types.xml:1.37
--- phpdoc-fr/language/types.xml:1.36 Wed Feb 25 09:07:19 2004
+++ phpdoc-fr/language/types.xml Thu Apr 15 17:23:19 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.36 $ -->
+<!-- $Revision: 1.37 $ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<chapter id="language.types">
<title>Les types</title>
@@ -1555,6 +1555,14 @@
tableau vide.
</para>
</sect2>
+ <sect2 id="language.types.array.comparing">
+ <title>Comparaisons de tableaux</title>
+ <para>
+ Il est possible de comparer des tableaux grâce à
+ la fonctoin <function>array_diff</function> et aux
+ <link linkend="language.operators.array">opérateurs de tableaux</link>.
+ </para>
+ </sect2>
<sect2 id="language.types.array.examples">
<title>Exemples</title>
<para>