No syntax highlighting

I have the full IntelliJ package but seeing as it includes PHPstorm I hope this forum is most relevant.

I've started messing around with PHP a bit but  I don't get any syntax highlighting. I'm using the Darcula theme.

For instance:

<!DOCTYPE html>
    <title>PHP Meuk</title>

    echo "Hello World!";
    $variableName = "MyName";



Is all one color apart from the title "PHP Meuk"

I opened an HTML file in a new project and renamed it to a .php file.

I checked Settings | File Types (under IDE settings)  and .php is listed under the HTML files.

Anyone any idea how I could solve this?

Thanks a lot in advance!

Does anyone have any idea how I can get syntax highlighting working?
Comment actions Permalink


It must be a borked setting, seeing as it's mixing colors now :) the <?php opening tag is one color and the ?> closing one another.

Comment actions Permalink

Hi there,

If you look at the icon this file has, it tells that this file (or maybe even all php files) is associated with HTML file rather than PHP.

To "fix" it:

  • Settings | File Types
  • Check patterns that assigned to "HTML files" and remove unwanted (depends on what you will have there, you may need to assign some of them back to PHP files)

If unsure -- post screenshots of Settings | File Types -- for both "HTML files" as well as "PHP files"

Comment actions Permalink

Thank you so much for your quick answer. Fixed!


Please sign in to leave a comment.