PHP directive highlight.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ibndiyaa
Forum Newbie
Posts: 4
Joined: Mon Jan 11, 2010 7:52 pm

PHP directive highlight.

Post 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.
SidewinderX
Forum Contributor
Posts: 407
Joined: Fri Jul 16, 2004 9:04 pm
Location: NY

Re: PHP directive highlight.

Post by SidewinderX »

I believe it is used for the highlight_file and highlight_string functions.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP directive highlight.

Post 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...)
ibndiyaa
Forum Newbie
Posts: 4
Joined: Mon Jan 11, 2010 7:52 pm

Re: PHP directive highlight.

Post by ibndiyaa »

Thank you both for the answer.
Post Reply