Re: Boolean type forced on string assignment inside if statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 4, 2013 at 1:56 AM, Sebastian Krebs <krebs.seb@xxxxxxxxx> wrote:
> 2013/1/4 tamouse mailing lists <tamouse.lists@xxxxxxxxx>
>> 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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux