reference/var/functions/is-float.xml
f044a792f0041c0f4335d9467ca73115d8a8ee00
...
...
@@ -1,62 +1,59 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id="function.is-float" xmlns="http://docbook.org/ns/docbook">
4
-
<refnamediv>
5
-
<refname>is_float</refname>
6
-
<refpurpose>Finds whether the type of a variable is float</refpurpose>
7
-
</refnamediv>
8
-
<refsect1 role="description">
9
-
&reftitle.description;
10
-
<methodsynopsis>
11
-
<type>bool</type><methodname>is_float</methodname>
12
-
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
13
-
</methodsynopsis>
14
-
<para>
15
-
Finds whether the type of the given variable is float.
16
-
</para>
17
-
<note>
18
-
<para>
19
-
To test if a variable is a number or a numeric string (such as form
20
-
input, which is always a string), you must use
21
-
<function>is_numeric</function>.
22
-
</para>
23
-
</note>
24
-
</refsect1>
25
-
<refsect1 role="parameters">
26
-
&reftitle.parameters;
27
-
<para>
28
-
<variablelist>
29
-
<varlistentry>
30
-
<term><parameter>var</parameter></term>
31
-
<listitem>
32
-
<para>
33
-
The variable being evaluated.
34
-
</para>
35
-
</listitem>
36
-
</varlistentry>
37
-
</variablelist>
38
-
</para>
39
-
</refsect1>
40
-
<refsect1 role="returnvalues">
41
-
&reftitle.returnvalues;
42
-
<para>
43
-
Returns &true; if <parameter>var</parameter> is a <type>float</type>,
44
-
&false; otherwise.
45
-
</para>
46
-
</refsect1>
47
-
<refsect1 role="examples">
48
-
&reftitle.examples;
49
-
<para>
3
+
<refentry xml:id="function.is-float" xmlns="http://docbook.org/ns/docbook">
4
+
<refnamediv>
5
+
<refname>is_float</refname>
6
+
<refpurpose>Finds whether the type of a variable is float</refpurpose>
7
+
</refnamediv>
8
+
<refsect1 role="description">
9
+
&reftitle.description;
10
+
<methodsynopsis>
11
+
<type>bool</type><methodname>is_float</methodname>
12
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
13
+
</methodsynopsis>
14
+
<para>
15
+
Finds whether the type of the given variable is float.
16
+
</para>
17
+
<note>
18
+
<para>
19
+
To test if a variable is a number or a numeric string (such as form
20
+
input, which is always a string), you must use
21
+
<function>is_numeric</function>.
22
+
</para>
23
+
</note>
24
+
</refsect1>
25
+
<refsect1 role="parameters">
26
+
&reftitle.parameters;
27
+
<para>
28
+
<variablelist>
29
+
<varlistentry>
30
+
<term><parameter>value</parameter></term>
31
+
<listitem>
32
+
<para>
33
+
The variable being evaluated.
34
+
</para>
35
+
</listitem>
36
+
</varlistentry>
37
+
</variablelist>
38
+
</para>
39
+
</refsect1>
40
+
<refsect1 role="returnvalues">
41
+
&reftitle.returnvalues;
42
+
<para>
43
+
Returns &true; if <parameter>value</parameter> is a <type>float</type>,
44
+
&false; otherwise.
45
+
</para>
46
+
</refsect1>
47
+
<refsect1 role="examples">
48
+
&reftitle.examples;
49
+
<para>
50
50
<example>
51
51
<title><function>is_float</function> example</title>
52
52
<programlisting role="php">
53
53
<![CDATA[
54
54
<?php
55
-
if(is_float(27.25)) {
56
-
echo "is float\n";
57
-
}else {
58
-
echo "is not float\n";
59
-
}
55
+

56
+
var_dump(is_float(27.25));
60
57
var_dump(is_float('abc'));
61
58
var_dump(is_float(23));
62
59
var_dump(is_float(23.5));
...
...
@@ -68,7 +65,7 @@ var_dump(is_float(true));
68
65
&example.outputs;
69
66
<screen>
70
67
<![CDATA[
71
-
is float
68
+
bool(true)
72
69
bool(false)
73
70
bool(false)
74
71
bool(true)
...
...
@@ -80,21 +77,20 @@ bool(false)
80
77
</para>
81
78
</refsect1>
82
79

83
-
<refsect1 role="seealso">
84
-
&reftitle.seealso;
85
-
<para>
86
-
<simplelist>
87
-
<member><function>is_bool</function></member>
88
-
<member><function>is_int</function></member>
89
-
<member><function>is_numeric</function></member>
90
-
<member><function>is_string</function></member>
91
-
<member><function>is_array</function></member>
92
-
<member><function>is_object</function></member>
93
-
</simplelist>
94
-
</para>
95
-
</refsect1>
96
-
</refentry>
97
-

80
+
<refsect1 role="seealso">
81
+
&reftitle.seealso;
82
+
<para>
83
+
<simplelist>
84
+
<member><function>is_bool</function></member>
85
+
<member><function>is_int</function></member>
86
+
<member><function>is_numeric</function></member>
87
+
<member><function>is_string</function></member>
88
+
<member><function>is_array</function></member>
89
+
<member><function>is_object</function></member>
90
+
</simplelist>
91
+
</para>
92
+
</refsect1>
93
+
</refentry>
98
94
<!-- Keep this comment at the end of the file
99
95
Local variables:
100
96
mode: sgml
101
97