mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Better XML, fixed boolean where it should have said integer
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@49923 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b607876481
commit
c8b83442db
1 changed files with 8 additions and 8 deletions
|
@ -136,8 +136,8 @@
|
|||
<sect2 id="language.types.boolean.syntax">
|
||||
<title>Syntax</title>
|
||||
<para>
|
||||
To specify a boolean-literal, use either the keyword <literal>TRUE</literal>
|
||||
or <literal>FALSE</literal>. Both are case-insensitive.
|
||||
To specify a boolean-literal, use either the keyword <constant>TRUE</constant>
|
||||
or <constant>FALSE</constant>. Both are case-insensitive.
|
||||
<!-- technically they are just constants -->
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
|
@ -189,7 +189,7 @@ if ($show_separators)
|
|||
|
||||
<para>
|
||||
When converting to <type>boolean</type>, the following values
|
||||
are considered <literal>FALSE</literal>:
|
||||
are considered <constant>FALSE</constant>:
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
@ -225,12 +225,12 @@ if ($show_separators)
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
Every other value is considered <literal>TRUE</literal> (including any
|
||||
Every other value is considered <constant>TRUE</constant> (including any
|
||||
<link linkend="language.types.resource">resource</link>).
|
||||
<warning>
|
||||
<simpara>
|
||||
<literal>-1</literal> is considered
|
||||
<literal>TRUE</literal>, like any other non-zero (whether negative
|
||||
<constant>TRUE</constant>, like any other non-zero (whether negative
|
||||
or positive) number!
|
||||
</simpara>
|
||||
</warning>
|
||||
|
@ -345,7 +345,7 @@ var_dump($large_number);
|
|||
the <literal>(int)</literal> or the <literal>(integer)</literal> cast.
|
||||
However, in most cases you do not need to use the cast, since a value
|
||||
will be autmatically converted if an operator, function or
|
||||
control-structure requires a <type>boolean</type>-argument.
|
||||
control-structure requires a <type>integer</type>-argument.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <link linkend="language.types.type-juggling">type-juggling</link>.
|
||||
|
@ -355,8 +355,8 @@ var_dump($large_number);
|
|||
<title>From <link linkend="language.types.boolean"
|
||||
>booleans</link></title>
|
||||
<simpara>
|
||||
<literal>FALSE</literal> will yield
|
||||
<literal>0</literal> (zero), and <literal>TRUE</literal>
|
||||
<constant>FALSE</constant> will yield
|
||||
<literal>0</literal> (zero), and <constant>TRUE</constant>
|
||||
will yield <literal>1</literal> (one).
|
||||
</simpara>
|
||||
</sect3>
|
||||
|
|
Loading…
Reference in a new issue