PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Extract field

Last modified: 07 September 2023

The Extract Field refactoring lets you declare a new field and initialize it with the selected expression. The original expression is replaced with the usage of the field. The new field is created with the default visibility modifier, which is set on the Code Generation tab of the Code Style. PHP page of the Settings dialog (CtrlAlt0S).