0
votes

Does anyone know of a way to make NetBeans keep php syntax highlighting for php files even without the tags?

I know, normally, you would not want this, as then it would apply PHP highlighting to HTML, however, the code base I work with is all PHP CLI, and uses only a shebang, not the tags.

Basically, I want NetBeans to still highlight php code that looks like this

#!/usr/bin/php -F

echo "Hello World!\n";

instead of code that looks like this:

#!/usr/bin/php
<?php

 echo "Hello World\n";

?>
1

1 Answers

0
votes

You can add "<?php" after comment like:

#!/usr/bin/php -F
#<?php

echo "Hello World!\n";

This not will affect the run in php-cli and works well in Netbeans