Added the word type to clarify the purpose of the function, as well as several use cases

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@242499 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Paul Reinheimer 2007-09-13 18:11:20 +00:00
parent 3789a703c2
commit 5f4657f17f

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<refentry xml:id="function.is-int" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>is_int</refname>
<refpurpose>Find whether a variable is an integer</refpurpose>
<refpurpose>Find whether the type of a variable is integer</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 an integer.
Finds whether the type of the given variable is integer.
</para>
<note>
<para>
@ -44,6 +44,44 @@
&false; otherwise.
</para>
</refsect1>
<refsect1 role="is-int.examples">
&reftitle.examples;
<para>
<example>
<title><function>is_int</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
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"));
var_dump(is_int(23.5));
var_dump(is_int(true));
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
is integer
bool(true)
bool(false)
bool(false)
bool(false)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>