cvs: phpdoc /en/language control-structures.xml

From: Date: Tue, 26 Jun 2001 12:32:47 +0000
Subject: cvs: phpdoc /en/language control-structures.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969335643@lists.php.net to get a copy of this message
jeroen Tue Jun 26 14:32:47 2001 EDT Modified files: /phpdoc/en/language control-structures.xml Log: Noted that alternative syntax is deprecated. if: statements else: bla endif; I read that somewhere, but don't recall where :( Index: phpdoc/en/language/control-structures.xml diff -u phpdoc/en/language/control-structures.xml:1.29 phpdoc/en/language/control-structures.xml:1.30 --- phpdoc/en/language/control-structures.xml:1.29 Tue May 22 01:16:31 2001 +++ phpdoc/en/language/control-structures.xml Tue Jun 26 14:32:47 2001 @@ -38,7 +38,7 @@ than <replaceable>$b</replaceable>: <informalexample> <programlisting role="php"> -if ($a > $b) +if ($a &gt; $b) print "a is bigger than b"; </programlisting> </informalexample> @@ -54,7 +54,7 @@ <replaceable>$a</replaceable> into <replaceable>$b</replaceable>: <informalexample> <programlisting role="php"> -if ($a > $b) { +if ($a &gt; $b) { print "a is bigger than b"; $b = $a; } @@ -84,7 +84,7 @@ than b</computeroutput> otherwise: <informalexample> <programlisting role="php"> -if ($a > $b) { +if ($a &gt; $b) { print "a is bigger than b"; } else { print "a is NOT bigger than b"; @@ -119,7 +119,7 @@ or <computeroutput>a is smaller than b</computeroutput>: <informalexample> <programlisting role="php"> -if ($a > $b) { +if ($a &gt; $b) { print "a is bigger than b"; } elseif ($a == $b) { print "a is equal to b"; @@ -152,6 +152,18 @@ <sect1 id="control-structures.alternative-syntax"> <title>Alternative syntax for control structures</title> + <para> + <warning> + <simpara> + Alternative syntax is deprecated as of PHP 4. Basically, + it just generates unreadable code, and it gets + very complicated when mixing it with the normal syntax. + Although there are no plans to break this syntax, it + cannot be ruled out that one day this will stop working. + You are warned. + </simpara> + </warning> + </para> <para> PHP offers an alternative syntax for some of its control structures; namely, <literal>if</literal>,

« previous php.doc (#969335643) next »