php-general Digest 4 Jan 2013 21:34:31 -0000 Issue 8087
Topics (messages 320031 through 320031):
Re: Boolean type forced on string assignment inside if statement
320031 by: tamouse mailing lists
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On Fri, Jan 4, 2013 at 1:56 AM, Sebastian Krebs <krebs....@gmail.com> wrote:
> 2013/1/4 tamouse mailing lists <tamouse.li...@gmail.com>
>> Bit operators are not comparing values, they're COMBINING values.
>
> Technically spoken they're comparing bits, whereas boolean operators does
> the same, but treaten every value as a single bit.
And that's just going to confuse things. "Technically" speaking, bit
operations and NOT logical operations. If you do this:
if ($a & $b)
when you meant this:
if ($a && $b)
it's because you got lucky, not because it's correct.
--- End Message ---