#27 Find Usages for Symbols

PhpStorm can find all the usages of a symbol throughout your project; this includes everywhere a class is referenced and instanciated, everywhere a method is called, everywhere a field is written to and read from, etc.

To find all the usages for a symbol, hold down the Cmd key (Ctrl for Windows/Linux) then hover the mouse over the symbol declaration to turn it into a hyperlink, then click on the symbol to open the Usages popup which will list the usages for the symbol.

The show write access icon highlights usages that are writing a value to the symbol, and the show read access icon highlights usages that are reading from the symbol.

Alternatively place the cursor on the symbol declaration and press Alt+F7 to find the usages and open them in the Find panel. Or navigate to Edit | Find | Find Usages in the menus.

This is identical to Tip #10 Navigate to Declaration; so you can Cmd/Ctrl click on a symbol usage to navigate to the symbol declaration, and Cmd/Ctrl click on the symbol declaration to navigate to any of it’s usages.

Further Reading

comments powered by Disqus