mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Updated to correct errors in my original patch, and follow the pear coding standards
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@242735 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
03a6518068
commit
dd81f033d8
3 changed files with 83 additions and 15 deletions
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.is-float" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_float</refname>
|
||||
<refpurpose>Finds whether a variable is a float</refpurpose>
|
||||
<refpurpose>Finds whether the type of a variable is float</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Finds whether the given variable is a float.
|
||||
Finds whether the type of the given variable is float.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
|
@ -44,6 +44,42 @@
|
|||
&false; otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="is-float.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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="function.is-int" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_int</refname>
|
||||
|
@ -53,12 +53,10 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if(is_int(23))
|
||||
{
|
||||
echo "is integer\n";
|
||||
}else
|
||||
{
|
||||
echo "is not an integer\n";
|
||||
if (is_int(23)) {
|
||||
echo "is integer\n";
|
||||
} else {
|
||||
echo "is not an integer\n";
|
||||
}
|
||||
var_dump(is_int(23));
|
||||
var_dump(is_int("23"));
|
||||
|
@ -67,7 +65,7 @@ var_dump(is_int(true));
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
is integer
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="function.is-string" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_string</refname>
|
||||
<refpurpose>Finds whether a variable is a string</refpurpose>
|
||||
<refpurpose>Find whether the type of a variable is string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Finds whether the given variable is a string.
|
||||
Finds whether the type given variable is string.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
|
@ -33,10 +33,44 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if <parameter>var</parameter> is a <type>string</type>,
|
||||
Returns &true; if <parameter>var</parameter> is of type <type>string</type>,
|
||||
&false; otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="is-string.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>is_string</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (is_string("23")) {
|
||||
echo "is string\n";
|
||||
} else {
|
||||
echo "is not an string\n";
|
||||
}
|
||||
var_dump(is_string('abc'));
|
||||
var_dump(is_string("23"));
|
||||
var_dump(is_string(23.5));
|
||||
var_dump(is_string(true));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
is string
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue