<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Returns the type of a variant object</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.variant-fix.html">variant_fix</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.variant-idiv.html">variant_idiv</a></div> <div class="up"><a href="ref.com.html">COM Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.variant-get-type" class="refentry"> <div class="refnamediv"> <h1 class="refname">variant_get_type</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">variant_get_type</span> — <span class="dc-title">Returns the type of a variant object</span></p> </div> <div class="refsect1 description" id="refsect1-function.variant-get-type-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">int</span> <span class="methodname"><strong>variant_get_type</strong></span> ( <span class="methodparam"><span class="type"><a href="class.variant.html" class="type variant">variant</a></span> <code class="parameter">$variant</code></span> )</div> <p class="para rdfs-comment"> Returns the type of a variant object. </p> </div> <div class="refsect1 parameters" id="refsect1-function.variant-get-type-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">variant</code></em></span> <dd> <p class="para"> The variant object. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.variant-get-type-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> This function returns an integer value that indicates the type of <em><code class="parameter">variant</code></em>, which can be an instance of <a href="class.com.html" class="xref">COM</a>, <a href="class.dotnet.html" class="xref">DOTNET</a> or <a href="class.variant.html" class="xref">VARIANT</a> classes. The return value can be compared to one of the <strong><code>VT_XXX</code></strong> constants. </p> <p class="para"> The return value for COM and DOTNET objects will usually be <strong><code>VT_DISPATCH</code></strong>; the only reason this function works for those classes is because COM and DOTNET are descendants of VARIANT. </p> <p class="para"> In PHP versions prior to 5, you could obtain this information from instances of the VARIANT class ONLY, by reading a fake <em><code class="parameter">type</code></em> property. See the <a href="class.variant.html" class="xref">VARIANT</a> class for more information on this. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.variant-fix.html">variant_fix</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.variant-idiv.html">variant_idiv</a></div> <div class="up"><a href="ref.com.html">COM Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>