diff --git a/appendices/migration54.xml b/appendices/migration54.xml
index dc9df9196a..7a2427748c 100644
--- a/appendices/migration54.xml
+++ b/appendices/migration54.xml
@@ -91,7 +91,8 @@
The break
and continue
statements no longer accept variable arguments (e.g., break 1 + foo() * $bar;).
- Static arguments still work, such as break 2;.
+ Static arguments still work, such as break 2;. As a side effect of this change
+ break 0; and continue 0; are no longer allowed.
diff --git a/language/control-structures/break.xml b/language/control-structures/break.xml
index e1eeca087a..c1ce80c1ee 100644
--- a/language/control-structures/break.xml
+++ b/language/control-structures/break.xml
@@ -59,6 +59,13 @@ while (++$i) {
+
+ 5.4.0
+
+ break 0; is no longer valid. In previous versions it was interpreted
+ the same as break 1;.
+
+ 5.4.0
diff --git a/language/control-structures/continue.xml b/language/control-structures/continue.xml
index 392bd5bd01..99b95ecf46 100644
--- a/language/control-structures/continue.xml
+++ b/language/control-structures/continue.xml
@@ -20,14 +20,9 @@
continue 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 1, thus skipping
+ to the end of the current loop.
-
-
- continue 0; and continue 1; is the same
- as running continue;.
-
-
@@ -44,9 +39,9 @@ $i = 0;
while ($i++ < 5) {
echo "Outer \n";
while (1) {
- echo " Middle \n";
+ echo "Middle \n";
while (1) {
- echo " Inner \n";
+ echo "Inner \n";
continue 3;
}
echo "This never gets output. \n";
@@ -114,6 +109,13 @@ for ($i = 0; $i < 5; ++$i) {
+
+ 5.4.0
+
+ continue 0; is no longer valid. In previous versions it was interpreted
+ the same as continue 1;.
+
+ 5.4.0