variant_add() - com组件
variant_add()
(PHP 5, PHP 7)
"Adds" two variant values together and returns the result
说明
variant_add(mixed $left, mixed $right): variantAdds$leftto$rightusing the following rules(taken from the MSDN library), which correspond to those of Visual Basic:
If | Then |
---|---|
Both expressions are of the string type | Concatenation |
One expression is a string type and the other a character | Addition |
One expression is numeric and the other is a string | Addition |
Both expressions are numeric | Addition |
Either expression is NULL | NULL is returned |
Both expressions are empty | Integer subtype is returned |
参数
$left
The left operand.
$rightThe right operand.
Note:对于所有变量运算函数,本函数的参数可以是 PHP 内置的类型(整数,字符串,浮点数,布尔型或者NULL
),或者是一个 COM,VARIANT 或者 DOTNET 类的实例。PHP 内置类型将会使用和构造VARIANT类相同的规则转换成变量。COM 和 DOTNET 对象的值将会取其默认属性并被当成变量值使用。
变量运算函数是同名函数在 COM 库中的外包;有关此类函数的更多信息参见 MSDN 库。PHP 函数命名有少许区别,例如 PHP 中的variant_add()对应于 MSDN 文档中的VarAdd()。
返回值
Returns the result.
错误/异常
Throws a com_exception on failure.
参见
variant_sub()
Subtracts the value of the right variant from the left variant value
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!