<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision$ --> <refentry xml:id="function.is-float" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>is_float</refname> <refpurpose>Finds whether the type of a variable is float</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>is_float</methodname> <methodparam><type>mixed</type><parameter>var</parameter></methodparam> </methodsynopsis> <para> Finds whether the type of the given variable is float. </para> <note> <para> To test if a variable is a number or a numeric string (such as form input, which is always a string), you must use <function>is_numeric</function>. </para> </note> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>var</parameter></term> <listitem> <para> The variable being evaluated. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns &true; if <parameter>var</parameter> is a <type>float</type>, &false; otherwise. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>is_float</function> example</title> <programlisting role="php"> <![CDATA[ <?php if(is_float(27.25)) { echo "is float\n"; }else { echo "is not float\n"; } var_dump(is_float('abc')); var_dump(is_float(23)); var_dump(is_float(23.5)); var_dump(is_float(1e7)); //Scientific Notation var_dump(is_float(true)); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ is float bool(false) bool(false) bool(true) bool(true) bool(false) ]]> </screen> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>is_bool</function></member> <member><function>is_int</function></member> <member><function>is_numeric</function></member> <member><function>is_string</function></member> <member><function>is_array</function></member> <member><function>is_object</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->