By Anonymous (not verified) on
Hi, sometimes I see a break; like in the simplenews module, for example:
function simplenews_user(...) {
switch ($op) {
case 'form':
...
break;
}
}
In the profile module they don't make use of it. Is there a situation when I should use it and when not?
Comments
A couple I suppose If you
A couple I suppose
If you are doing a return in the code, you don't need to break, since it will never get to it.
Also if you actually want it to follow on and execute the code of the next case you can leave it out.