Description

Category: Bug

A variable appears in the code only once. In many cases it may be the result of a mistake or a typo.

Example

$variable = 1;

for (
$i=0; $i<10; $i++) {
    
$variable += $i;
    if (
$variale > 10) { // typo - should be $variable
        
echo "impossible!";
    } else if (
$var == 5) { // wrong variable name here - should be $variable
        
echo "in the middle";
    }
}