cvs: phpdoc /en/reference/var/functions is-int.xml

From: Date: Thu, 13 Sep 2007 18:11:20 +0000
Subject: cvs: phpdoc /en/reference/var/functions is-int.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-15@lists.php.net to get a copy of this message
preinheimer Thu Sep 13 18:11:20 2007 UTC Modified files: /phpdoc/en/reference/var/functions is-int.xml Log: Added the word type to clarify the purpose of the function, as well as several use cases http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/is-int.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/var/functions/is-int.xml diff -u phpdoc/en/reference/var/functions/is-int.xml:1.5 phpdoc/en/reference/var/functions/is-int.xml:1.6 --- phpdoc/en/reference/var/functions/is-int.xml:1.5 Wed Jun 20 22:25:34 2007 +++ phpdoc/en/reference/var/functions/is-int.xml Thu Sep 13 18:11:20 2007 @@ -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>

« previous php.doc.cvs (#15) next »