note 14302 deleted from control-structures by jimw

From: Date: Thu, 20 Dec 2001 23:09:45 +0000
Subject: note 14302 deleted from control-structures by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23538@lists.php.net to get a copy of this message
You should document an alternative à-la Perl form of conditional execution, using the special "or" and "and" construct: Here is the equivalence for the "or" special syntax construct: expression1 or statement; if (!(expression1)) statement; Here is the equivalence for the "and" special syntax construct: expression1 and statement; if (expression1) statement; These constructs can be combined in complex logic expressions, with "and" having a higher priority that "or": expr1 and expr2 or expr3 and expr4 or statement is equivalent to: if (!( (expr1) && (expr2) ||        (expr3) && (expr4) ))   statement;

« previous php.notes (#23538) next »