Как short-circuit, they are the same.
& & means
И ,
|| means
Or`, они действуют одинаково:
// foo() will never get called as those operators are short-circuit
$a = (false && foo());
$b = (true || foo());
$c = (false and foo());
$d = (true or foo());
В другой стороны, ||
имеет больший приоритет, чем or
,
// The result of the expression (false || true) is assigned to $e
// Acts like: ($e = (false || true))
$e = false || true;
// The constant false is assigned to $f and then true is ignored
// Acts like: (($f = false) or true)
$f = false or true;
То же самое с &&
и and
:
// The result of the expression (true && false) is assigned to $g
// Acts like: ($g = (true && false))
$g = true && false;
// The constant true is assigned to $h and then false is ignored
// Acts like: (($h = true) and false)
$h = true and false;
разные формы имеют разный приоритет. – Jon
Возможный дубликат ['AND' vs '&&' as operator] (http://stackoverflow.com/questions/2803321/and-vs-as-operator) – glomad