mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Fix doc bug #62222: Continue 0; is invalid
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325967 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
67921109e7
commit
55713d3fa0
3 changed files with 20 additions and 10 deletions
|
@ -91,7 +91,8 @@
|
|||
The <link linkend="control-structures.break">break</link>
|
||||
and <link linkend="control-structures.continue">continue</link>
|
||||
statements no longer accept variable arguments (e.g., <literal>break 1 + foo() * $bar;</literal>).
|
||||
Static arguments still work, such as <literal>break 2;</literal>.
|
||||
Static arguments still work, such as <literal>break 2;</literal>. As a side effect of this change
|
||||
<literal>break 0;</literal> and <literal>continue 0;</literal> are no longer allowed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -59,6 +59,13 @@ while (++$i) {
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
<literal>break 0;</literal> is no longer valid. In previous versions it was interpreted
|
||||
the same as <literal>break 1;</literal>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
|
|
|
@ -20,14 +20,9 @@
|
|||
<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. The default value is <literal>1</literal>, thus skipping
|
||||
to the end of the current loop.
|
||||
</simpara>
|
||||
<note>
|
||||
<para>
|
||||
<literal>continue 0;</literal> and <literal>continue 1;</literal> is the same
|
||||
as running <literal>continue;</literal>.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
|
@ -44,9 +39,9 @@ $i = 0;
|
|||
while ($i++ < 5) {
|
||||
echo "Outer<br />\n";
|
||||
while (1) {
|
||||
echo " Middle<br />\n";
|
||||
echo "Middle<br />\n";
|
||||
while (1) {
|
||||
echo " Inner<br />\n";
|
||||
echo "Inner<br />\n";
|
||||
continue 3;
|
||||
}
|
||||
echo "This never gets output.<br />\n";
|
||||
|
@ -114,6 +109,13 @@ for ($i = 0; $i < 5; ++$i) {
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
<literal>continue 0;</literal> is no longer valid. In previous versions it was interpreted
|
||||
the same as <literal>continue 1;</literal>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
|
|
Loading…
Reference in a new issue