variant_fix

(PHP 5, PHP 7, PHP 8)

variant_fixReturns the integer portion of a variant

Descrição

variant_fix ( mixed $value ) : variant

Gets the integer portion of a variant.

Parâmetros

value

The variant.

Nota:

Assim como todas as funções aritméticas, 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ão convertidos para variants usando as mesmas regras como mencionadas no construtor da classe variant. Objetos COM e DOTNET terão o valor de suas propriedades padrão obtidos e usados como um valor variant.

As funções aritméticas variant são wrappers para funções chamadas similarmente na biblioteca COM; para mais informação sobre estas funções, consulte o MSDN. As funções PHP são nomeadas ligeiramente diferentes; por exemplo variant_add() no PHP corresponde à VarAdd() na documentação MSDN.

Valor Retornado

If value is negative, then the first negative integer greater than or equal to the variant is returned, otherwise returns the integer portion of the value of value.

Erros

Throws a com_exception on failure.

Notas

Aviso

This documentation is based on the MSDN documentation; it appears that this function is either the same as variant_int(), or that there is an error in the MSDN documentation.

Veja Também

  • variant_int() - Returns the integer portion of a variant
  • variant_round() - Rounds a variant to the specified number of decimal places
  • floor() - Arredonda frações para baixo
  • ceil() - Arredonda frações para cima
  • round() - Arredonda um número

add a note add a note

User Contributed Notes

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