On 11/21/2026 5:32 PM, Arne Vajhøj wrote:
> PHP & &&
> | ||
> and(**)
> or(**)
> **) do not use ever
And in case somebody wonder.
$ php crazy.php
False
True
True False
$ clean
$ type crazy.php
<?php
$a = True;
$b = False;
$c = $a && $b;
echo sprintf("%s\n", $c ? 'True' : 'False');
$c = $a and $b;
echo sprintf("%s\n", $c ? 'True' : 'False');
$c2 = ($c1 = $a and $b);
echo sprintf("%s %s\n", $c1 ? 'True' : 'False', $c2 ? 'True' : 'False');
?>
$ php crazy.php
False
True
True False
Arne