variant_mul

(PHP 5, PHP 7)

variant_mulMultiplies the values of the two variants

Opis

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

Multiplies left by right.

Parametry

left

The left operand.

right

The right operand.

Boolean values are converted to -1 for FALSE and 0 for TRUE.

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 Multiplication Rules
If Then
Both expressions are of the string, date, character, boolean type Multiplication
One expression is a string type and the other a character Multiplication
One expression is numeric and the other is a string Multiplication
Both expressions are numeric Multiplication
Either expression is NULL NULL is returned
Both expressions are empty Empty string is returned

Błędy/Wyjątki

Throws a com_exception on failure.

Zobacz też:

  • variant_div() - Returns the result from dividing two variants
  • variant_idiv() - Converts variants to integers and then returns the result from dividing them

add a note add a note

User Contributed Notes

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