And-equals doesnt retain boolean property, what will?
Posted: Wed May 09, 2007 10:56 am
This is sort of in another post, but since it has somewhat become cluttered, I am starting this new one:
I noticed that an "&=" or "|=" on a Boolean value will not retain its Boolean type. For example if I do something like this:
Question: Is there a more efficient way to do this besides doing something longer such as:
Thanks!
I think I gave a little better example in my other post (middle or so): viewtopic.php?p=379808#379808
I noticed that an "&=" or "|=" on a Boolean value will not retain its Boolean type. For example if I do something like this:
Code: Select all
$a = false;
$b = false;
$a &= $b;
if ($a === false)
{
// This will not pass
}Code: Select all
$a = $a && $b;I think I gave a little better example in my other post (middle or so): viewtopic.php?p=379808#379808