From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version: 4.0.6
PHP Bug Type: Variables related
Bug description: gettype(true && true) returns "integer"!
The && operator (and ||) returns an integer value even when both arguments
are boolean. Thus the following code:
function is_true($val)
{
return (is_bool($val) && $val);
}
echo (is_true(true) ? 'T' : 'F'),"\n";
echo (is_true(is_true(true)) ? 'T' : 'F'),"\n";
gives
T
F
-- Nick
--
Edit bug report at: http://bugs.php.net/?id=12245&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]