<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.variant-div.php',
    1 => 'variant_div',
    2 => 'Returns the result from dividing two variants',
  ),
  'up' => 
  array (
    0 => 'ref.com.php',
    1 => 'COM Функції',
  ),
  'prev' => 
  array (
    0 => 'function.variant-date-to-timestamp.php',
    1 => 'variant_date_to_timestamp',
  ),
  'next' => 
  array (
    0 => 'function.variant-eqv.php',
    1 => 'variant_eqv',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/com/functions/variant-div.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.variant-div" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">variant_div</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">variant_div</span> &mdash; <span class="dc-title">Returns the result from dividing two variants</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.variant-div-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>variant_div</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">
   Divides <code class="parameter">left</code> by <code class="parameter">right</code> and
   returns the result.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.variant-div-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,
 будуть перетворені у &quot;варіанти&quot; за правилами, описаними в конструкторі класу
 <a href="class.variant.php" class="xref">variant</a>. В об&#039;єктів COM і DOTNET значеннями
 &quot;варіантів&quot; будуть початкові значення властивостей цих об&#039;єктів.
</p>
<p class="para">
 Варіантні арифметичні функції є надбудовами однойменних функцій бібліотеки COM.
 Докладніша інформація про ці функції є в документації до бібліотеки MSDN.
 Функції в PHP називаються дещо інакше, ніж в бібліотеці MDSN. Наприклад,
 <span class="function"><a href="function.variant-add.php" class="function">variant_add()</a></span> в PHP відповідає <code class="literal">VarAdd()</code> в
 MSDN.
</p>
</p></blockquote>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.variant-div-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Variant 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>Double is returned</td>
      </tr>

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

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

      <tr>
       <td>Both expressions are numeric</td>
       <td>Division and a double is returned</td>
      </tr>

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

      <tr>
       <td><code class="parameter">right</code> is empty and
       <code class="parameter">left</code> is anything but 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>

      <tr>
       <td><code class="parameter">left</code> is empty and
       <code class="parameter">right</code> is anything but empty.</td>
       <td>0 as type double 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-overflow">DISP_E_OVERFLOW</a></code></strong>
       is thrown</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.variant-div-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-div-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.variant-idiv.php" class="function" rel="rdfs-seeAlso">variant_idiv()</a> - Converts variants to integers and then returns the result from dividing them</span></li>
   </ul>
  </p>
 </div>

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