PhpStorm 2019.3 Help

Code Inspection: Reuse of local variable

Reports where local variables are "reused", overwriting theirvalues with new values unrelated to their original use. Such local variable reuse may be confusing,as the intended semantics of the local variable may vary with each use. It may also beprone to bugs, if code changes result in values that were thought to be overwritten actuallybeing live. It is good practices to keep variable lifetimes as short as possible, and notreuse local variables for the sake of brevity.

Last modified: 20 February 2020