Page 1 of 1

PHP directive highlight.

Posted: Mon Jan 11, 2010 7:54 pm
by ibndiyaa
Greetings,

I am fairly new to PHP and was going over the directives in the php.ini file, and I'm confused about the highlight.XXX directives; used for syntax highlighting. But I thought the software which we use to write PHP scripts is the only way we can have syntax highlighting? Could someone please explain.

Thank you.

Sohail.

Re: PHP directive highlight.

Posted: Mon Jan 11, 2010 8:53 pm
by SidewinderX
I believe it is used for the highlight_file and highlight_string functions.

Re: PHP directive highlight.

Posted: Mon Jan 11, 2010 9:18 pm
by requinix
SidewinderX wrote:I believe it is used for the highlight_file and highlight_string functions.
Yep.

They don't have to be just colors either. The PHP guys themselves use hacks like

Code: Select all

ini_set("highlight.bg", '#ABC" class="highlight-background'); // <font color="#ABC" class="highlight-background">
('course PHP uses <span>s, not <font>s now...)

Re: PHP directive highlight.

Posted: Mon Jan 11, 2010 10:36 pm
by ibndiyaa
Thank you both for the answer.