This is a bug that appeared in the latest version 9.0.1.
The idea was to handle double extensions in the file name and automatically set the external language. What this means: in a regular .php file, all text outside of the PHP tags is treated as HTML / Plain Text .., but in files like file.js.php , the external language (text outside of the PHP tags) is likely to have JavaScript instead HTML To have it as JavaScript (syntax highlighting and code completion / analysis), you need to manually configure it for JavaScript for each file / directory.
Therefore, the developers decided (after many votes in the corresponding ticket) to automate this task. Unfortunately, they didn’t check well enough how it will work with other double extensions (in particular .inc.php or .tpl.php ), therefore, the current behavior / error.
This behavior has already been fixed, and 9.0.2 should arrive soon (a few days). In the meantime, you can fix it manually in several ways:
You can simply rename the file to get rid of such a double extension, for example. make it just header.php or inc.header.php .
Or manually set the external language as HTML in Settings (Preferences on Mac) | Editor | Template Data Languages Settings (Preferences on Mac) | Editor | Template Data Languages Settings (Preferences on Mac) | Editor | Template Data Languages - find your file there and set the HTML in the second column.
UPDATE: (08/18/2015)
PhpStorm v9.0.2 is now released.
source share