mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Document that a semicolon also may be used after a case, like: case 1; case 2;, ...
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@265141 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3e99f84597
commit
ec9fc2e0f7
1 changed files with 23 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.163 $ -->
|
||||
<!-- $Revision: 1.164 $ -->
|
||||
<chapter xml:id="language.control-structures" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -1070,6 +1070,28 @@ default:
|
|||
echo "i is not equal to 0, 1 or 2";
|
||||
endswitch;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Its possible to use a semicolon insted of a colon after a case like:
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
switch($beer)
|
||||
{
|
||||
case 'tuborg';
|
||||
case 'carlsberg';
|
||||
case 'heineken';
|
||||
echo 'Good choice';
|
||||
break;
|
||||
default;
|
||||
echo 'Please make a new selection...';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
|
Loading…
Reference in a new issue