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";



-- Nick

Edit bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to