Document incompatibility of using multiple default blocks in a switch

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337707 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Thomas Punt 2015-09-02 13:10:53 +00:00
parent b35940f9fd
commit b6366e47af

View file

@ -207,11 +207,11 @@ yield ($foo or die);
</sect3>
<sect3 xml:id="migration70.incompatible.other.func-parameters">
<title>Functions can't have more than one parameter with the same name</title>
<title>Functions cannot have multiple parameters with the same name</title>
<para>
It is no longer possible to define two function parameters with the same
name. For example, the following method will trigger
It is no longer possible to define two or more function parameters with the
same name. For example, the following function will trigger an
<constant>E_COMPILE_ERROR</constant>:
</para>
@ -228,6 +228,31 @@ function foo($a, $b, $unused, $unused) {
</informalexample>
</sect3>
<sect3 xml:id="migration70.incompatible.other.multiple-default">
<title>Switch statements cannot have multiple default blocks</title>
<para>
It is no longer possible to define two or more default blocks in a switch
statement. For example, the following will switch statement will trigger an
<constant>E_COMPILE_ERROR</constant>:
</para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
switch (1) {
default:
break;
default:
break;
}
?>
]]>
</programlisting>
</informalexample>
</sect3>
<sect3 xml:id="migration70.incompatible.other.http-raw-post-data">
<title><varname>$HTTP_RAW_POST_DATA</varname> removed</title>