mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
ad44aca38e
commit
5748a4eb77
1 changed files with 25 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue