(PHP 5)
variant_cmp — Compares two variants
Compares left with right.
This function will only compare scalar values, not arrays or variant records.
The left operand.
The right operand.
A valid Locale Identifier to use when comparing strings (this affects string collation).
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 |
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.
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 |