note 39903 deleted from function.is-bool by nlopess
| From: | nlopess@php.net | Date: | Sun, 15 Feb 2004 10:07:40 +0000 |
| Subject: | note 39903 deleted from function.is-bool by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-65162@lists.php.net to get a copy of this message | ||
Note Submitter: Lars Olson lolson@positivesale.com
----
In the code, at the second instance of "echo" there is a minor error as far as I can
tell.
Corrected:
<?php
$a = false;
$b = 0;
// Since $a is a boolean, this is true
if (is_bool($a)) {
echo "Yes, this is a boolean";
}
// Since $b is not a boolean, this is not true
if (is_bool($b)) {
echo "No, this is not a boolean";
}
?>