How do I highlight built-in variables in PHP that are not already highlighted?



  • Hello Notepad++ forum!

    Question: How do I highlight built-in variables in PHP that are not already highlighted?

    I have noticed that variables like “real_escape_string” and “num_rows” are not highlighted.

    I have got Notepad++ version 6.9.2.

    Thank you in advance.



  • @Pete-Norris You could try adding them to the Keywords section of the php Language in the langs.xml file.



  • Jim;

    All I could find was langs.model.xml. It’s in the Notepad++ root directory (Notepad++\langs.model.xml)

    I added real_escape_string in the langs.model.xml file and it did not seem to work.

    Are there any other suggestions?

    Thanks.



  • @Pete-Norris My bad–wrong file. I have made additions to the C language section of the stylers.xml file. This allowed me to highlight various “words” with different highlighting.

    You should look for LexerType name=“php” and add your new keywords to whatever WordsStyle you want to be used to highlight them.


Log in to reply