<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.variant-cast.php',
    1 => 'variant_cast',
    2 => 'Convert a variant into a new variant object of another type',
  ),
  'up' => 
  array (
    0 => 'ref.com.php',
    1 => 'COM Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.variant-and.php',
    1 => 'variant_and',
  ),
  'next' => 
  array (
    0 => 'function.variant-cat.php',
    1 => 'variant_cat',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/com/functions/variant-cast.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.variant-cast" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">variant_cast</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">variant_cast</span> &mdash; <span class="dc-title">Convert a variant into a new variant object of another type</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.variant-cast-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>variant_cast</strong></span>(<span class="methodparam"><span class="type"><a href="class.variant.php" class="type variant">variant</a></span> <code class="parameter">$variant</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$type</code></span>): <span class="type"><a href="class.variant.php" class="type variant">variant</a></span></div>

  <p class="para rdfs-comment">
   This function makes a copy of <code class="parameter">variant</code> and then
   performs a variant cast operation to force the copy to have the type
   given by <code class="parameter">type</code>.
  </p>
  <p class="para">
   This function wraps VariantChangeType() in the COM library; consult MSDN
   for more information.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.variant-cast-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">variant</code></dt>
     <dd>
      <p class="para">
       The variant.
      </p>
     </dd>
    
    
     <dt><code class="parameter">type</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">type</code> should be one of the
       <strong><code><a href="com.constants.php#constant.vt-null">VT_<span class="replaceable">*</span></a></code></strong> constants.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.variant-cast-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns a variant of given <code class="parameter">type</code>.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.variant-cast-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.variant-set-type.php" class="function" rel="rdfs-seeAlso">variant_set_type()</a> - Convert a variant into another type &quot;in-place&quot;</span></li>
   </ul>
  </p>
 </div>

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