Different icon for php class files
I have three types of php files in my project:
- *.php - Procedural php files that act as landing pages
- *.inc - Procedural php files included/required in other files
- *.inc - Php class files.
I'd like to be able to tell in the Editor Tabs (which I have on the left, vertical) which files are the Php classes.

If necessary I'd be willing to use a different file-extension, though being able to change the icon or text color based on the folder they're in would be better.
I couldn't see any way to do either of those though, any ideas?
请先登录再写评论。
Hi there,
That's not really possible (for icons).
In this IDE .. in order to have code to be recognized as PHP and have support from IDE; the file has to be associated with "PHP" file type (Settings/Preferences | File Types).
You cannot have that one file type to have different file icons.
On another hand -- depending on how your code is written and how you name your files and classes, PhpStorm will be showing different icons:
Check this comment for example: https://youtrack.jetbrains.com/issue/WI-18878#comment=27-1546559
-----
The only other thing I might suggest is custom Scopes in combination with File Colors -- if done properly it will allow to have different tab backgrounds for each scope (NOTE: scope works with file names/path names only -- not their content). This may not solve your issue in full (as it does not affect icons and does not work with file content) -- it's only partial solution that might work if files are located in folder structure in certain places.
-----
Other than that -- you will have to write your own plugin where you can dynamically decide what icon you want to show.
Ah, thanks Andriy, that's exactly what I want!
The (C) icon does show for my class files in some places, but not others:
I've made a new issue: https://youtrack.jetbrains.com/issue/WI-33979
And in the mean time the scopes idea works great too - thanks!