continue” targeting switch is equivalent to “break¶
Description¶
The recommendation is to use break
inside a switch, and continue
in loops. Both keywords achieve the same feature of terminating the current structure and following up with the execution, they carry different human meanings.
Example¶
<?php
switch($a) {
case 1:
continue;
}
?>
Solutions¶
Use
break
.