<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >variant_fix</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="COM and .Net (Windows)" HREF="ref.com.html"><LINK REL="PREVIOUS" TITLE="variant_eqv" HREF="function.variant-eqv.html"><LINK REL="NEXT" TITLE="variant_get_type" HREF="function.variant-get-type.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.variant-eqv.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.variant-get-type.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.variant-fix" ></A >variant_fix</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN21595" ></A ><P > (PHP 5)</P >variant_fix -- Returns the integer portion ? of a variant </DIV ><DIV CLASS="refsect1" ><A NAME="AEN21598" ></A ><H2 >Description</H2 >mixed <B CLASS="methodname" >variant_fix</B > ( mixed variant )<BR ></BR ><P > If <CODE CLASS="parameter" >variant</CODE > 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 <CODE CLASS="parameter" >variant</CODE >. </P ><P > See also <A HREF="function.variant-int.html" ><B CLASS="function" >variant_int()</B ></A >, <A HREF="function.variant-round.html" ><B CLASS="function" >variant_round()</B ></A >, <A HREF="function.floor.html" ><B CLASS="function" >floor()</B ></A >, <A HREF="function.ceil.html" ><B CLASS="function" >ceil()</B ></A >, <A HREF="function.round.html" ><B CLASS="function" >round()</B ></A >. </P ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Atenção</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P > This documentation is based on the MSDN documentation; it appears that this function is either the same as <A HREF="function.variant-int.html" ><B CLASS="function" >variant_int()</B ></A >, or that there is an error in the MSDN documentation. </P ></TD ></TR ></TABLE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B > As with all the variant arithmetic functions, the parameters for this function can be either a PHP native type (integer, string, floating point, boolean or <TT CLASS="constant" ><B >NULL</B ></TT >), or an instance of a COM, VARIANT or DOTNET class. PHP native types will be converted to variants using the same rules as found in the constructor for the <A HREF="class.variant.html" >VARIANT</A > class. COM and DOTNET objects will have the value of their default property taken and used as the variant value. </P ><P > The variant arithmetic functions are wrappers around the similarly named functions in the COM library; for more information on these functions, consult the MSDN library. The PHP functions are named slightly differently; for example variant_add() in PHP corresponds to VarAdd() in the MSDN documentation. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.variant-eqv.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.variant-get-type.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >variant_eqv</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.com.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >variant_get_type</TD ></TR ></TABLE ></DIV ></BODY ></HTML >