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

From: Date: Thu, 20 Sep 2007 14:53:34 +0000
Subject: cvs: phpdoc /en/reference/var/functions is-float.xml is-int.xml is-string.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-40@lists.php.net to get a copy of this message
preinheimer Thu Sep 20 14:53:34 2007 UTC Modified files: /phpdoc/en/reference/var/functions is-float.xml is-int.xml is-string.xml Log: Updated to correct errors in my original patch, and follow the pear coding standards http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/is-float.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/var/functions/is-float.xml diff -u phpdoc/en/reference/var/functions/is-float.xml:1.5 phpdoc/en/reference/var/functions/is-float.xml:1.6 --- phpdoc/en/reference/var/functions/is-float.xml:1.5 Wed Jun 20 22:25:34 2007 +++ phpdoc/en/reference/var/functions/is-float.xml Thu Sep 20 14:53:34 2007 @@ -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> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/is-int.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/var/functions/is-int.xml diff -u phpdoc/en/reference/var/functions/is-int.xml:1.6 phpdoc/en/reference/var/functions/is-int.xml:1.7 --- phpdoc/en/reference/var/functions/is-int.xml:1.6 Thu Sep 13 18:11:20 2007 +++ phpdoc/en/reference/var/functions/is-int.xml Thu Sep 20 14:53:34 2007 @@ -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 @@ ?> ]]> </programlisting> - &example.outputs.similar; + &example.outputs; <screen> <![CDATA[ is integer http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/is-string.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/var/functions/is-string.xml diff -u phpdoc/en/reference/var/functions/is-string.xml:1.6 phpdoc/en/reference/var/functions/is-string.xml:1.7 --- phpdoc/en/reference/var/functions/is-string.xml:1.6 Wed Jun 20 22:25:34 2007 +++ phpdoc/en/reference/var/functions/is-string.xml Thu Sep 20 14:53:34 2007 @@ -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>

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