php8.5
Home/ Manual/ com / functions/ variant_and

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

left

The left operand.

right

The right operand.

Variant-arith

Return Values

If left isIf right isthen the result is
truetruetrue
truefalsefalse
truenullnull
falsetruefalse
falsefalsefalse
falsenullfalse
nulltruenull
nullfalsefalse
nullnullnull

Errors/Exceptions

Throws a com_exception on failure.

See Also

Source: reference/com/functions/variant-and.xml · from the official PHP manual (php/doc-en)