Quote:
Originally Posted by Shadowless
&& = AND
|| = OR
& = ? <-- whats one & means?
once upon a time i was IRC scripter 
|
& = if contains specified bit (its like >=, <, == ...)
can have 32 bits
1 2 4 8 16 32 64...
This is used to reduce memory
Setting bits:
PHP Code:
Variable = (1 << 0)
PHP Code:
Variable |= (1 << 0)
(Last one adds bits)
(1 << 0) = 1
(1 << 1) = 2
(1 << 2) = 4 ... up to (1 << 31)
Setting more than 1 bits:
PHP Code:
Variable |= (1 << 0)|(1 << 1);
Checking for bits:
PHP Code:
if (Variable & (1 << 0))
or
PHP Code:
if (Variable & 1)
...
Unsetting bits:
PHP Code:
Variable &= ~(1 << 0)
__________________