philip Thu Feb 20 11:51:18 2003 EDT
Modified files:
/phpdoc/en/reference/var/functions is-bool.xml
Log:
bool -> boolean, and added an example
Index: phpdoc/en/reference/var/functions/is-bool.xml
diff -u phpdoc/en/reference/var/functions/is-bool.xml:1.3
phpdoc/en/reference/var/functions/is-bool.xml:1.4
--- phpdoc/en/reference/var/functions/is-bool.xml:1.3 Wed Feb 19 17:11:54 2003
+++ phpdoc/en/reference/var/functions/is-bool.xml Thu Feb 20 11:51:17 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.19 -->
<refentry id="function.is-bool">
<refnamediv>
@@ -16,7 +16,30 @@
</methodsynopsis>
<para>
Returns &true; if the <parameter>var</parameter> parameter is
- a <type>bool</type>.
+ a <type>boolean</type>.
+ </para>
+ <para>
+ <example>
+ <title><function>is_bool</function> examples</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$a = false;
+$b = 0;
+
+// Since $a is a boolean, this is true
+if (is_bool($a)) {
+ print "Yes, this is a boolean";
+}
+
+// Since $b is not a boolean, this is not true
+if (is_bool($b)) {
+ print "Yes, this is a boolean";
+}
+?>
+]]>
+ </programlisting>
+ </example>
</para>
<para>
See also
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php