note 116448 deleted from control-structures.switch by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 17:51:20 +0000 |
| Subject: | note 116448 deleted from control-structures.switch by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218661@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Please note that PHP won't throw any error/warning if your
switch utilizes more
than one default - in such case it will just jump to the first one.
Also note that you (for unknown reason for me) are allowed to use semicolons ; along
colon : for case and default entries:
<?php
switch($foo) {
case 0: // colon
...
break;
case 1; // semicolon is fine
...
break;
}