牛牛在线工具

variant_div()

收录 8868 个 PHP 函数,含用途说明与用法示例。

variant_div()

返回两个变量相除的结果

(PHP 5, PHP 7, PHP 8) variant_div — 返回两个变量相除的结果 说明 variant_div(mixed $left, mixed $right): variant 左除以右并返回结果。 参数 left The left operand.左操作数。 right The right operand.右操作数。 注意: 对于所有变量运算函数,本函数的参数可以是 PHP 内置的类型(整数,字符串,浮点数,布尔型或者 null),或者是一个 COM,VARIANT 或者 DOTNET 类的实例。PHP 内置类型将会使用和构造variant类相同的规则转换成变量。COM 和 DOTNET 对象的值将会取其默认属性并被当成变量值使用。 变量运算函数是同名函数在 COM 库中的外包;有关此类函数的更多信息参见 MSDN 库。PHP 函数命名有少许区别,例如 PHP 中的 variant_add() 对应于 MSDN 文档中的 VarAdd()。 返回值 IfThen Both expressions are of the string, date, character, boolean typeDouble is returned One expression is a string type and the other a characterDivision and a double is returned One expression is numeric and the other is a stringDivision and a double is returned. Both expressions are numericDivision and a double is returned Either expression is NULLNULL is returned right is empty and left is anything but emptyA com_exception with code DISP_E_DIVBYZERO is thrown left is empty and right is anything but empty.0 as type double is returned Both expressions are emptyA com_exception with code DISP_E_OVERFLOW is thrown 错误/异常 失败时抛出com异常。