Skip to content

Commit b5ef0ac

Browse files
author
cmb
committed
Fix #77053: Invalid "continue" handling change in PHP 7 is undocumented
git-svn-id: http://svn.php.net/repository/phpdoc/en@345956 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 02d204d commit b5ef0ac

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

trunk/appendices/migration70/incompatible/other.xml

+10
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ switch (1) {
361361
</note>
362362
</sect3>
363363

364+
<sect3 xml:id="migration70.incompatible.other.break-continue">
365+
<title>Misplaced break and switch statements</title>
366+
<para>
367+
<literal>break</literal> and <literal>continue</literal> statements outside of
368+
a loop or <literal>switch</literal> control structure are now detected at
369+
compile-time instead of run-time as before, and trigger an
370+
<constant>E_COMPILE_ERROR</constant>.
371+
</para>
372+
</sect3>
373+
364374
<sect3 xml:id="migration70.incompatible.other.mhash">
365375
<title>Mhash is not an extension anymore</title>
366376
<para>

trunk/language/control-structures/break.xml

+8
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ while (++$i) {
6060
</row>
6161
</thead>
6262
<tbody>
63+
<row>
64+
<entry>7.0.0</entry>
65+
<entry>
66+
<literal>break</literal> outside of a loop or <literal>switch</literal>
67+
control structure is now detected at compile-time instead of run-time as
68+
before, and triggers an <constant>E_COMPILE_ERROR</constant>.
69+
</entry>
70+
</row>
6371
<row>
6472
<entry>5.4.0</entry>
6573
<entry>

trunk/language/control-structures/continue.xml

+8
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ for ($i = 0; $i < 5; ++$i) {
119119
</row>
120120
</thead>
121121
<tbody>
122+
<row>
123+
<entry>7.0.0</entry>
124+
<entry>
125+
<literal>continue</literal> outside of a loop or <literal>switch</literal>
126+
control structure is now detected at compile-time instead of run-time as
127+
before, and triggers an <constant>E_COMPILE_ERROR</constant>.
128+
</entry>
129+
</row>
122130
<row>
123131
<entry>5.4.0</entry>
124132
<entry>

0 commit comments

Comments
 (0)