if ($var1 & $var2) { do sth.. }
Does it check if both variables got a value assigned to themselves or what is it for? Thanks!
Its checking if both variables are true. Eg-
$var1=true; $var2=true; if ($var1 & $var2) echo "its true"; else echo "its false";
Its checking if both variables are true.
nope, that would be
if ($var1 && $var2) {}
a single & is a bitwise operator, and is actually checking bits set in $var1 and $var2 are both set.