note 39903 added to function.is-bool

From: Date: Sun, 15 Feb 2004 02:06:44 +0000
Subject: note 39903 added to function.is-bool
Groups: php.notes 
Request: Send a blank email to php-notes+get-65153@lists.php.net to get a copy of this message
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"; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.is-bool.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39903 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39903&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39903&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65153) next »