variant_or

(PHP 5, PHP 7)

variant_orPerforms a logical disjunction on two variants

Opis

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

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

Parametry

left

The left operand.

right

The right operand.

Informacja:

Wszystkie arytmetyczne funkcje wariantowe przyjmują jako parametry albo rdzenne typy PHP (integer, string, floating point, boolean lub NULL), albo instancje klas COM, VARINAT lub DOTNET. Rdzenne typy PHP są konwertowane do wariantowych przy użyciu tych samych reguł, które znajdują się w klasie konstruktora variant. Obiekty COM i DOTNET powinny mieć wartości swoich domyślnych właściwości pobierane i używane jako wartości wariantowe.

Arytmetyczne funkcje wariantowe są nakładkami na podobnie nazwane funkcje w bibliotece COM; aby uzyskac więcej informacji o tych funkcjach odwiedź witrynę biblioteki MSDN. Funkcje PHP są nazwane nieco inaczej. Na przykład funkcji variant_add() w PHP odpowiada VarAdd() w dokumentacji MSDN.

Zwracane wartości

Variant OR Rules
If left is If right is then the result is
TRUETRUETRUE
TRUEFALSETRUE
TRUENULLTRUE
FALSETRUETRUE
FALSEFALSEFALSE
FALSENULLNULL
NULLTRUETRUE
NULLFALSENULL
NULLNULLNULL

Błędy/Wyjątki

Throws a com_exception on failure.

Zobacz też:

  • variant_and() - Performs a bitwise AND operation between two variants
  • variant_xor() - Performs a logical exclusion on two variants

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top