php教程

variant_fix

(PHP 5, PHP 7)

variant_fixReturns the integer portion of a variant

说明

variant_fix ( mixed $variant ) : variant

Gets the integer portion of a variant.

参数

variant

The variant.

Note:

对于所有变量运算函数,本函数的参数可以是 PHP 内置的类型(整数,字符串,浮点数,布尔型或者 NULL),或者是一个 COM,VARIANT 或者 DOTNET 类的实例。PHP 内置类型将会使用和构造VARIANT类相同的规则转换成变量。COM 和 DOTNET 对象的值将会取其默认属性并被当成变量值使用。

变量运算函数是同名函数在 COM 库中的外包;有关此类函数的更多信息参见 MSDN 库。PHP 函数命名有少许区别,例如 PHP 中的 variant_add() 对应于 MSDN 文档中的 VarAdd()

返回值

If variant 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 variant.

错误/异常

Throws a com_exception on failure.

注释

Warning

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.

参见

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788