svn: /phpdoc/en/trunk/reference/var/ functions/boolval.xml functions/floatval.xml functions/intval.xml functions/strval.xml versions.xml

From: Date: Fri, 23 Nov 2012 08:43:19 +0000
Subject: svn: /phpdoc/en/trunk/reference/var/ functions/boolval.xml functions/floatval.xml functions/intval.xml functions/strval.xml versions.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-10756@lists.php.net to get a copy of this message
aharvey Fri, 23 Nov 2012 08:43:19 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=328469 Log: Add boolval() documentation. Changed paths: A phpdoc/en/trunk/reference/var/functions/boolval.xml U phpdoc/en/trunk/reference/var/functions/floatval.xml U phpdoc/en/trunk/reference/var/functions/intval.xml U phpdoc/en/trunk/reference/var/functions/strval.xml U phpdoc/en/trunk/reference/var/versions.xml Added: phpdoc/en/trunk/reference/var/functions/boolval.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/boolval.xml (rev 0) +++ phpdoc/en/trunk/reference/var/functions/boolval.xml 2012-11-23 08:43:19 UTC (rev 328469) @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> + +<refentry xml:id="function.boolval" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>boolval</refname> + <refpurpose>Get the boolean value of a variable</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>boolean</type><methodname>boolval</methodname> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + </methodsynopsis> + <para> + Returns the <type>boolean</type> value of <parameter>var</parameter>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + The scalar value being converted to a <type>boolean</type>. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The <type>boolean</type> value of <parameter>var</parameter>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>boolval</function> examples</title> + <programlisting role="php"> +<![CDATA[ +<?php +echo '0: '.(boolval(0) ? 'true' : 'false')."\n"; +echo '42: '.(boolval(42) ? 'true' : 'false')."\n"; +echo '0.0: '.(boolval(0.0) ? 'true' : 'false')."\n"; +echo '4.2: '.(boolval(4.2) ? 'true' : 'false')."\n"; +echo '"": '.(boolval("") ? 'true' : 'false')."\n"; +echo '"string": '.(boolval("string") ? 'true' : 'false')."\n"; +echo '[1, 2]: '.(boolval([1, 2]) ? 'true' : 'false')."\n"; +echo '[]: '.(boolval([]) ? 'true' : 'false')."\n"; +echo 'stdClass: '.(boolval(new stdClass) ? 'true' : 'false')."\n"; +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +0: false +42: true +0.0: false +4.2: true +"": false +"string": true +[1, 2]: true +[]: false +stdClass: true +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>floatval</function></member> + <member><function>intval</function></member> + <member><function>strval</function></member> + <member><function>settype</function></member> + <member><function>is_bool</function></member> + <member><link linkend="language.types.type-juggling">Type juggling</link></member> + </simplelist> + </para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Property changes on: phpdoc/en/trunk/reference/var/functions/boolval.xml ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Modified: phpdoc/en/trunk/reference/var/functions/floatval.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/floatval.xml 2012-11-23 08:41:31 UTC (rev 328468) +++ phpdoc/en/trunk/reference/var/functions/floatval.xml 2012-11-23 08:43:19 UTC (rev 328469) @@ -66,6 +66,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>boolval</function></member> <member><function>intval</function></member> <member><function>strval</function></member> <member><function>settype</function></member> Modified: phpdoc/en/trunk/reference/var/functions/intval.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/intval.xml 2012-11-23 08:41:31 UTC (rev 328468) +++ phpdoc/en/trunk/reference/var/functions/intval.xml 2012-11-23 08:43:19 UTC (rev 328469) @@ -142,6 +142,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>boolval</function></member> <member><function>floatval</function></member> <member><function>strval</function></member> <member><function>settype</function></member> Modified: phpdoc/en/trunk/reference/var/functions/strval.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/strval.xml 2012-11-23 08:41:31 UTC (rev 328468) +++ phpdoc/en/trunk/reference/var/functions/strval.xml 2012-11-23 08:43:19 UTC (rev 328469) @@ -86,6 +86,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>boolval</function></member> <member><function>floatval</function></member> <member><function>intval</function></member> <member><function>settype</function></member> Modified: phpdoc/en/trunk/reference/var/versions.xml =================================================================== --- phpdoc/en/trunk/reference/var/versions.xml 2012-11-23 08:41:31 UTC (rev 328468) +++ phpdoc/en/trunk/reference/var/versions.xml 2012-11-23 08:43:19 UTC (rev 328469) @@ -5,6 +5,7 @@ --> <versions> + <function name='boolval' from='PHP 5 &gt;= 5.5.0'/> <function name='debug_zval_dump' from='PHP 4 &gt;= 4.2.0, PHP 5'/> <function name='doubleval' from='PHP 4, PHP 5'/> <function name='empty' from='PHP 4, PHP 5'/> @@ -64,4 +65,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +-->

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