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

variant_xor

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Performs a logical exclusion on two variants

Description

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

Performs a logical exclusion.

Parameters

left

The left operand.

right

The right operand.

Variant-arith

Return Values

If left isIf right isthen the result is
truetruefalse
truefalsetrue
falsetruetrue
falsefalsefalse
nullnullnull

Errors/Exceptions

Throws a com_exception on failure.

See Also

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