!$a Logical not Tags ! comparison logical not Related $a && $b $a || $b $a = true; !$a; // false $b = false; !$b; // true // Also works with truthy and falsy values: 1 || 0; // true 0 || ''; // false 1.0+