PHP Velho Oeste 2024

variant_mul

(PHP 5, PHP 7)

variant_mulMultiplies the values of the two variants

설명

mixed variant_mul ( mixed $left , mixed $right )

Multiplies left by right.

인수

left

The left operand.

right

The right operand.

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

Note:

variant 연산 함수와 마찬가지로, 이 함수의 인수로는 PHP 자료형(정수, 문자열, 소수, 논리, NULL)이나 COM, VARIANT, DOTNET 클래스의 인스턴스를 사용할 수 있습니다. PHP 자료형은 VARIANT 클래스 생성자와 같은 방식으로 vriant로 변환됩니다. COM과 DOTNET 객체는 기본 프로퍼티 값을 variant 값으로 사용합니다.

variant 연산 함수는 비슷한 이름의 COM 라이브러리 함수의 래퍼입니다; 이 함수들에 관한 자세한 정보는 MSDN 라이브러리를 참조하십시오. PHP 함수 이름은 차이가 있습니다; 예를 들어, PHP에서 variant_add()는 MSDN 문서의 VarAdd()에 해당합니다.

반환값

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

참고

  • 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