note 71012 deleted from control-structures.break by peehaa
| From: | peehaa@php.net | Date: | Wed, 22 Feb 2017 09:36:46 +0000 |
| Subject: | note 71012 deleted from control-structures.break by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208797@lists.php.net to get a copy of this message | ||
Note Submitter: clean_code at is_good_code dot com
----
"Just an insignificant side not: Like in C/C++, it's not necessary to break out of the
default part of a switch statement in PHP."
--Yes it is, it's just that traditionally default: is the last entry of a switch and so nothing
happens after.
-If it was, for whatever reason, not the last entry the script would bawk, there is no implicit
break; associated with switch.