bool -> boolean, and added an example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@117356 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2003-02-20 16:51:17 +00:00
parent ad44aca38e
commit 5748a4eb77

View file

@ -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