1.2.1072. Self-Transforming Variables¶
Variables that are assigned to themselves, after transformation. Auto-transformations include appending element to an array, using post and pre increment operators, and assigning to the variable the result of a call where the variable is also an argument.
<?php
$s = strtolower($s);
// filtering one element AND dropping all that not 1
$a = array_filter('foo', $a[1]);
$o->m = foo($o->m);
?>
1.2.1072.1. Suggestions¶
Use new variables to hold transformed values.
1.2.1072.2. Specs¶
Short name |
Variables/SelfTransform |
Rulesets |
|
Exakat since |
1.7.0 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
High |
Available in |