<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.com.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.variant-idiv.php',
    1 => 'variant_idiv',
    2 => 'Converts variants to integers and then returns the result from dividing them',
  ),
  'up' => 
  array (
    0 => 'ref.com.php',
    1 => 'COM 函数',
  ),
  'prev' => 
  array (
    0 => 'function.variant-get-type.php',
    1 => 'variant_get_type',
  ),
  'next' => 
  array (
    0 => 'function.variant-imp.php',
    1 => 'variant_imp',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/com/functions/variant-idiv.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.variant-idiv" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">variant_idiv</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">variant_idiv</span> &mdash; <span class="dc-title">Converts variants to integers and then returns the result from dividing them</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.variant-idiv-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>variant_idiv</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$left</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$right</code></span>): <span class="type"><a href="class.variant.php" class="type variant">variant</a></span></div>

  <p class="para rdfs-comment">
   Converts <code class="parameter">left</code> and <code class="parameter">right</code> to
   integer values, and then performs integer division.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.variant-idiv-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">left</code></dt>
     <dd>
      <p class="para">
       The left operand.
      </p>
     </dd>
    
    
     <dt><code class="parameter">right</code></dt>
     <dd>
      <p class="para">
       The right operand.
      </p>
     </dd>
    
   </dl>
   <blockquote class="note"><p><strong class="note">注意</strong>: 
<p class="para">
 对于所有变量运算函数，本函数的参数可以是 PHP
 内置的类型（整数，字符串，浮点数，布尔型或者
 <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>），或者是一个 COM，VARIANT 或者 DOTNET 类的实例。PHP
 内置类型将会使用和构造<a href="class.variant.php" class="xref">variant</a>类相同的规则转换成变量。COM 和 DOTNET
 对象的值将会取其默认属性并被当成变量值使用。
</p>
<p class="para">
 变量运算函数是同名函数在 COM
 库中的外包；有关此类函数的更多信息参见 MSDN
 库。PHP 函数命名有少许区别，例如 PHP
 中的 <span class="function"><a href="function.variant-add.php" class="function">variant_add()</a></span> 对应于
 MSDN 文档中的 <code class="literal">VarAdd()</code>。
</p>
</p></blockquote>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.variant-idiv-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Variant Integer Division Rules</strong></caption>
    
     <thead>
      <tr>
       <th>If</th>
       <th>Then</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>Both expressions are of the string, date, character, boolean type</td>
       <td>Division and integer is returned</td>
      </tr>

      <tr>
       <td>One expression is a string type and the other a
       character</td>
       <td>Division</td>
      </tr>

      <tr>
       <td>One expression is numeric and the other is a string</td>
       <td>Division</td>
      </tr>

      <tr>
       <td>Both expressions are numeric</td>
       <td>Division</td>
      </tr>

      <tr>
       <td>Either expression is NULL</td>
       <td>NULL is returned</td>
      </tr>

      <tr>
       <td>Both expressions are empty</td>
       <td>A <span class="classname"><a href="class.com-exception.php" class="classname">com_exception</a></span> with code <strong><code><a href="com.constants.php#constant.disp-e-divbyzero">DISP_E_DIVBYZERO</a></code></strong>
       is thrown</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.variant-idiv-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   Throws a <span class="classname"><a href="class.com-exception.php" class="classname">com_exception</a></span> on failure.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.variant-idiv-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.variant-div.php" class="function" rel="rdfs-seeAlso">variant_div()</a> - Returns the result from dividing two variants</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>