variant_cmp
(PHP 5)
variant_cmp — Compares two variants
Descrição
Compares left with right .
This function will only compare scalar values, not arrays or variant records.
Parâmetros
- left
-
The left operand.
- right
-
The right operand.
- lcid
-
A 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:
Variant Comparision Flags 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
Nota: Assim como todas as funções aritméticas variant, os parâmetros para esta função podem ser qualquer um tipo nativo do PHP (integer, string, ponto flutuante, booleano ou NULL), ou uma instancia de uma classe COM, VARIANT ou DOTNET. Tipos nativos do PHP será convertido para variants usando a mesma regra como encontrado no construtor para a classe VARIANT. Objetos COM e DOTNET terão o valor de suas propriedades padrão obtidos e usados como valor variant.
As funções aritméticas variant são wrappers para as chamadas similarmente funções na biblioteca COM; para mais informação sobre estas funções, consulte a biblioteca MSDN. As funções PHP são nomeadas ligeiramente diferentes; por exemplo variant_add() no PHP corresponde a VarAdd() na documentação MSDN.
Valor Retornado
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 |
variant_cmp
