IDEA: “Assign statement to new local variable”?

Refactor | Introduce Variable (Ctrl+Alt+V on Windows). Note that you don’t need to select the text if it’s the only text in the current line. Then you can change the variable name in-line just like you’ve described and press Enter to complete editing.

Another way is to use the Postfix Completion:

Type .var (or just .v to select it from the list) and confirm it with Enter.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)