array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.variant-cast.php', 1 => 'variant_cast', ), 'up' => array ( 0 => 'ref.com.php', 1 => 'COM 函数', ), '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', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
variant_cast — Convert a variant into a new variant object of another type
This function makes a copy of variant
and then
performs a variant cast operation to force the copy to have the type
given by type
.
This function wraps VariantChangeType() in the COM library; consult MSDN for more information.
variant
The variant.
type
type
should be one of the
VT_XXX
constants.
Returns a variant of given type
.