Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable PHP Syntax highlighting in Visual Studio Code?

I use MAMP (on windows) as a local web server and I just started to use Visual Studio Code. I set the php.exe path in the settings.json file trough "php.validate.executablePath". It seems work, or maybe it gives me no error, so I think it's working, but the PHP syntax highlighting doesn't work. All my variables are white colored and so the functions.

What could be the problem?

Thank you all.

EDIT: Ok, this was a theme problem and the highlighting started to work properly, but my "<?php ?>" tags inside the html code look the same color as other tags. Is there a way to fix it?

like image 231
RufusJoy Avatar asked Apr 14 '26 01:04

RufusJoy


1 Answers

Make sure you didn't forget your

<?php ... ?>

tags

like image 86
SomeGenericDev Avatar answered Apr 15 '26 14:04

SomeGenericDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!