dams Thu May 10 11:01:07 2001 EDT
Modified files:
/phpdoc/en/language expressions.xml
Log:
Added jeroen's updates
Index: phpdoc/en/language/expressions.xml
diff -u phpdoc/en/language/expressions.xml:1.3 phpdoc/en/language/expressions.xml:1.4
--- phpdoc/en/language/expressions.xml:1.3 Wed Jul 5 09:45:25 2000
+++ phpdoc/en/language/expressions.xml Thu May 10 11:01:07 2001
@@ -171,16 +171,17 @@
One last thing worth mentioning is the truth value of expressions.
In many events, mainly in conditional execution and loops, you're
not interested in the specific value of the expression, but only
- care about whether it means TRUE or FALSE (PHP doesn't have a
- dedicated boolean type). The truth value of expressions in PHP is
- calculated in a similar way to perl. Any numeric non-zero numeric
- value is TRUE, zero is FALSE. Be sure to note that negative
- values are non-zero and are thus considered TRUE! The empty
- string and the string "0" are FALSE; all other strings are TRUE.
- With non-scalar values (arrays and objects) - if the value
- contains no elements it's considered FALSE, otherwise it's
- considered TRUE.</simpara>
-
+ care about whether it means TRUE or FALSE.
+
+ <!-- (PHP doesn't have a
+ dedicated boolean type) : WRONG, php does. -->
+
+ The constants TRUE and FALSE (case-insensitive) are the two
+ possible boolean values. When necessary, an expression is
+ autmatically converted to boolean. See the
+ <link linked="language.types.typecasting">section about
+ type-casting</link> for details about how.
+ </simpara>
<simpara>
PHP provides a full and powerful implementation of expressions, and
documenting it entirely goes beyond the scope of this manual. The