Increase your productivity with “Inline Variable” refactoring

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!

This entry was posted in Cool Feature, PhpStorm and tagged , , . Bookmark the permalink.
  • hongbo

    very nice for saving code, it works for javascript as well :)

  • Axel Rauschmayer

    Could we have separate blogs (or at least feeds) for WebStorm and PhpStorm? I love JavaScript and WebStorm, but could not care less about PHP news.

  • goyote

    Use the tags in the sidebar.

  • Alexey Korsun

    @Axel Rauschmayer:
    Yes, we are going to separate blogs, but not right now.

  • Axel Rauschmayer