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

variant_or

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Performs a logical disjunction on two variants

Description

variant_or(mixed $left, mixed $right): variant

Performs a bitwise OR operation. Note that this is slightly different from a regular OR operation.

Parameters

left

The left operand.

right

The right operand.

Variant-arith

Return Values

If left isIf right isthen the result is
truetruetrue
truefalsetrue
truenulltrue
falsetruetrue
falsefalsefalse
falsenullnull
nulltruetrue
nullfalsenull
nullnullnull

Errors/Exceptions

Throws a com_exception on failure.

See Also

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