1.2.1165. Strpos() Less Than One¶
This rule was suggested by Yann Ouche.
<?php
// this works both when $a starts with .
// and when the . is not in the string.
if (strpos($a, '.') < 1) {
}
?>
1.2.1165.1. Suggestions¶
Make sure that the 2 cases are valid business cases.
1.2.1165.2. Specs¶
Short name |
Structures/StrposLessThanOne |
Rulesets |
|
Exakat since |
2.6.6 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Available in |