svn: /phpdoc/fr/trunk/language/ functions.xml

From: Date: Sat, 17 Jul 2010 21:16:53 +0000
Subject: svn: /phpdoc/fr/trunk/language/ functions.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-8051@lists.php.net to get a copy of this message
yannick Sat, 17 Jul 2010 21:16:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=301352 Log: sync with EN Changed paths: U phpdoc/fr/trunk/language/functions.xml Modified: phpdoc/fr/trunk/language/functions.xml =================================================================== --- phpdoc/fr/trunk/language/functions.xml 2010-07-17 18:48:15 UTC (rev 301351) +++ phpdoc/fr/trunk/language/functions.xml 2010-07-17 21:16:53 UTC (rev 301352) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 297028 Maintainer: jpauli Status: ready --> +<!-- EN-Revision: 301351 Maintainer: jpauli Status: ready --> <!-- Reviewed: yes --> <chapter xml:id="language.functions" xmlns="http://docbook.org/ns/docbook"> @@ -558,6 +558,32 @@ </programlisting> </example> </para> + <para> + Lors de l'appel à des méthodes statiques, l'appel fonction est meilleur que + l'opérateur de propriété statique : + <example> + <title>Exemple de méthode variable avec des propriétés statiques</title> + <programlisting role="php"> +<![CDATA[ +<?php +class Foo +{ + static $variable = 'static property'; + static function Variable() + { + echo 'Method Variable called'; + } +} + +echo Foo::$variable; // Ceci affiche 'static property'. Il est nécessaire d'avoir une $variable dans le contexte. +$variable = "Variable"; +Foo::$variable(); // Ceci appelle $foo->Variable(), lisant ainsi la $variable depuis le contexte. + +?> +]]> + </programlisting> + </example> + </para> <para> Voir aussi <function>call_user_func</function>,

« previous php.doc.fr (#8051) next »