cvs: phpdoc-de /language variables.xml

From: Date: Sat, 16 Aug 2003 13:23:29 +0000
Subject: cvs: phpdoc-de /language variables.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-880@lists.php.net to get a copy of this message
ali Sat Aug 16 09:23:29 2003 EDT Modified files: /phpdoc-de/language variables.xml Log: sync to en Index: phpdoc-de/language/variables.xml diff -u phpdoc-de/language/variables.xml:1.21 phpdoc-de/language/variables.xml:1.22 --- phpdoc-de/language/variables.xml:1.21 Wed Aug 13 17:44:54 2003 +++ phpdoc-de/language/variables.xml Sat Aug 16 09:23:28 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> +<!-- $Revision: 1.22 $ --> <!-- EN-Revision: 1.68 Maintainer: betz Status: ready --> <chapter id="language.variables"> <title>Variablen</title> @@ -593,6 +593,32 @@ </programlisting> </example> </para> + <note> + <para> + Statische Variablen werden wie in oben stehenden Beispielen deklariert. + Das Zuweisen eines Wertes, welcher das Ergebniss eines Ausdrucks ist, + wird mit einem parse error quittiert. + </para> + <para> + <example> + <title>Statische Variablen deklarieren</title> + <programlisting role="php"> +<![CDATA[ +<?php +function foo(){ + static $int = 0; // korrekt + static $int = 1+2; // falsch (da ein Ausdruck vorliegt) + static $int = sqrt(121); // falsch (ebenfalls ein Ausdruck) + + $int++; + echo $int; +} +?> +]]> + </programlisting> + </example> + </para> + </note> </sect2> <sect2 id="language.variables.scope.references">

« previous php.doc.de (#880) next »