1.2.1421. Variables With Long Names¶
This analysis collects all variables with more than 20 characters longs. This may be configured with the
variableLength
parameter.
PHP has not limitation on variable name size. While short name are often obscure, long names are usually better. Yet, there exists a limit to convenient variable name length.
<?php
// Quite a long variable name
$There_is nothing_wrong_with_long_variable_names_They_tend_to_be_rare_and_that_make_them_noteworthy = 1;
?>
Name |
Default |
Type |
Description |
variableLength |
20 |
integer |
Minimum size of a long variable name, including the initial $. |
See also Basics.
1.2.1421.1. Suggestions¶
Try to use short variable names.
1.2.1421.2. Specs¶
Short name |
Variables/VariableLong |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Available in |