variant_and
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Performs a bitwise AND operation between two variants
Description
variant_and(mixed $left, mixed $right): variant
Performs a bitwise AND operation. Note that this is slightly different from a regular AND operation.
Parameters
leftThe left operand.
rightThe right operand.
Variant-arith
Return Values
If left is | If right is | then the result is |
|---|---|---|
| true | true | true |
| true | false | false |
| true | null | null |
| false | true | false |
| false | false | false |
| false | null | false |
| null | true | null |
| null | false | false |
| null | null | null |
Errors/Exceptions
Throws a com_exception on failure.