From 6d6899c5765ad5463fe46b46329567c0a80df598 Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Tue, 26 Jun 2001 12:32:47 +0000 Subject: [PATCH] Noted that alternative syntax is deprecated. if: statements else: bla endif; I read that somewhere, but don't recall where :( git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50215 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index 8b46c0c24f..b8771d5297 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -38,7 +38,7 @@ if (expr) than $b: -if ($a > $b) +if ($a > $b) print "a is bigger than b"; @@ -54,7 +54,7 @@ if ($a > $b) $a into $b: -if ($a > $b) { +if ($a > $b) { print "a is bigger than b"; $b = $a; } @@ -84,7 +84,7 @@ if ($a > $b) { than b otherwise: -if ($a > $b) { +if ($a > $b) { print "a is bigger than b"; } else { print "a is NOT bigger than b"; @@ -119,7 +119,7 @@ if ($a > $b) { or a is smaller than b: -if ($a > $b) { +if ($a > $b) { print "a is bigger than b"; } elseif ($a == $b) { print "a is equal to b"; @@ -152,6 +152,18 @@ if ($a > $b) { Alternative syntax for control structures + + + + 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. + + + PHP offers an alternative syntax for some of its control structures; namely, if,