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:
Nikita Popov 2012-06-04 13:22:33 +00:00
parent 67921109e7
commit 55713d3fa0
3 changed files with 20 additions and 10 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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 "&nbsp;Middle<br />\n";
echo "Middle<br />\n";
while (1) {
echo "&nbsp;&nbsp;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>