1.2.87. Break With 0¶
<?php
// Can't break 0. Must be 1 or more, depending on the level of nesting.
for($i = 0; $i < 10; $i++) {
break 0;
}
for($i = 0; $i < 10; $i++) {
for($j = 0; $j < 10; $j++) {
break 2;
}
}
?>
1.2.87.1. Suggestions¶
Remove 0, or the break
1.2.87.2. Specs¶
Short name |
Structures/Break0 |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
With PHP 5.4 and older |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |