mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Whitespace changes.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@323873 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8d6f8cfbd7
commit
d90c8c357f
1 changed files with 52 additions and 52 deletions
|
@ -20,7 +20,7 @@
|
|||
<simpara>
|
||||
<literal>continue</literal> accepts an optional numeric argument
|
||||
which tells it how many levels of enclosing loops it should skip
|
||||
to the end of.
|
||||
to the end of.
|
||||
</simpara>
|
||||
<note>
|
||||
<para>
|
||||
|
@ -56,15 +56,15 @@ while ($i++ < 5) {
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Omitting the semicolon after <literal>continue</literal> can lead to
|
||||
confusion. Here's an example of what you shouldn't do.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Omitting the semicolon after <literal>continue</literal> can lead to
|
||||
confusion. Here's an example of what you shouldn't do.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
for ($i = 0; $i < 5; ++$i) {
|
||||
|
@ -74,57 +74,57 @@ for ($i = 0; $i < 5; ++$i) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
One can expect the result to be:
|
||||
</para>
|
||||
<screen>
|
||||
</programlisting>
|
||||
<para>
|
||||
One can expect the result to be:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
0
|
||||
1
|
||||
3
|
||||
4
|
||||
]]>
|
||||
</screen>
|
||||
<para>
|
||||
but this script will output:
|
||||
</para>
|
||||
<screen>
|
||||
</screen>
|
||||
<para>
|
||||
but this script will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
2
|
||||
]]>
|
||||
</screen>
|
||||
<para>
|
||||
because the entire <literal>continue print "$i\n";</literal> is evaluated
|
||||
as a single expression, and so <function>print</function> is called only
|
||||
when <literal>$i == 2</literal> is true. (The return value of
|
||||
<literal>print</literal> is passed to <literal>continue</literal> as the
|
||||
numeric argument.)
|
||||
</para>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Changelog for <literal>continue</literal></title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
Removed the ability to pass in variables (e.g., <literal>$num = 2; continue $num;</literal>)
|
||||
as the numerical argument.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</screen>
|
||||
<para>
|
||||
because the entire <literal>continue print "$i\n";</literal> is evaluated
|
||||
as a single expression, and so <function>print</function> is called only
|
||||
when <literal>$i == 2</literal> is true. (The return value of
|
||||
<literal>print</literal> is passed to <literal>continue</literal> as the
|
||||
numeric argument.)
|
||||
</para>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Changelog for <literal>continue</literal></title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
Removed the ability to pass in variables (e.g., <literal>$num = 2; continue $num;</literal>)
|
||||
as the numerical argument.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue