(PHP 5, PHP 7)
variant_cmp — Compares two variants
Compares left with right.
This function will only compare scalar values, not arrays or variant records.
leftThe left operand.
rightThe right operand.
lcidA valid Locale Identifier to use when comparing strings (this affects string collation).
flags
flags can be one or more of the following values
OR'd together, and affects string comparisons:
| value | meaning |
|---|---|
NORM_IGNORECASE |
Compare case insensitively |
NORM_IGNORENONSPACE |
Ignore nonspacing characters |
NORM_IGNORESYMBOLS |
Ignore symbols |
NORM_IGNOREWIDTH |
Ignore string width |
NORM_IGNOREKANATYPE |
Ignore Kana type |
NORM_IGNOREKASHIDA |
Ignore Arabic kashida characters |
Note:
variant 연산 함수와 마찬가지로, 이 함수의 인수로는 PHP 자료형(정수, 문자열, 소수, 논리,
NULL)이나 COM, VARIANT, DOTNET 클래스의 인스턴스를 사용할 수 있습니다. PHP 자료형은 VARIANT 클래스 생성자와 같은 방식으로 vriant로 변환됩니다. COM과 DOTNET 객체는 기본 프로퍼티 값을 variant 값으로 사용합니다.variant 연산 함수는 비슷한 이름의 COM 라이브러리 함수의 래퍼입니다; 이 함수들에 관한 자세한 정보는 MSDN 라이브러리를 참조하십시오. PHP 함수 이름은 차이가 있습니다; 예를 들어, PHP에서 variant_add()는 MSDN 문서의 VarAdd()에 해당합니다.
Returns one of the following:
| value | meaning |
|---|---|
VARCMP_LT |
left is less than
right
|
VARCMP_EQ |
left is equal to
right
|
VARCMP_GT |
left is greater than
right
|
VARCMP_NULL |
Either left,
right or both are NULL
|