Increase your productivity with “Inline Variable” refactoring

Posted on by Egor Malyshev

Hello guys,

PhpStorm 2.0 brings you several new refactorings including “Inline Variable”. This is the first refactoring from the ‘Inline…’ refactorings family.

“Inline Variable” replaces a variable with its previously assigned value and could be considered as reverse to the “Introduce Variable” refactoring which is bundled since PhpStorm 1.0.

In order to invoke the refactoring, move the cursor over the local variable to apply the refactoring to and press Ctrl+Alt+N(for Windows) or Cmd+Opt+N(for Mac).



You can also inline variables embedded in string literals:



Develop with pleasure!


Subscribe for updates