array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.variant-int.php', 1 => 'variant_int', ), 'up' => array ( 0 => 'ref.com.php', 1 => 'COM Funciones', ), 'prev' => array ( 0 => 'function.variant-imp.php', 1 => 'variant_imp', ), 'next' => array ( 0 => 'function.variant-mod.php', 1 => 'variant_mod', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/com/functions/variant-int.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
variant_int — Returns the integer portion of a variant
value
The variant.
Nota:
Al igual que con todas las funciones aritméticas variantes, los parámetros de esta función pueden ser tanto un tipo nativo de PHP (integer, string, de punto flotante, boolean o
null
), o una instancia de una clase COM, VARIANT o DOTNET. Los tipos nativos de PHP serán convertidos en variantes usando las mismas reglas tal como se encuentran en el constructor para la clase variant. Los objetos COM y DOTNET tomarán el valor de sus propiedades predeterminadas adoptadas y lo utilizarán como el valor variante.Las funciones aritméticas variantes son wrappers alrededor de las funciones con nombres similares en la librería COM; para más información sobre estas funciones, consulte la librería MSDN. Las funciones de PHP tienen nombres ligeramente diferentes; por ejemplo, variant_add() en PHP corresponde a
VarAdd()
en la documentación MSDN.
If value
is negative, then the first negative
integer greater than or equal to the variant is returned, otherwise
returns the integer portion of the value of
value
.
Throws a com_exception on failure.