Unwrapping and Removing Statements
PhpStorm enables you to quickly unwrap or extract expressions from the enclosing statements. This action is available for:
- XML and HTML tags.
- PHP: if, else, while, do...while, for, and try...catch control structures
To unwrap or remove a statement
- Place the caret on the expression you want to extract or unwrap.
- Choose on the main menu or press
Ctrl+Shift+Delete. PhpStorm shows a pop-up window with all the actions that are available in the current context.
Statements to be extracted are displayed on the blue background, statements to be removed are displayed
on the grey background.
- Click the desired action or select it using the up and down arrow keys and press Enter.
Last modified: 24 November 2016