Page 1 of 1
The "Blue" Comments...
Posted: Sat Sep 06, 2008 7:06 pm
by lightnb
I fell kind of stupid asking this, but:
What's the deal with the "Blue" comments, that begin with /** ?
In my editor, when you add the extra asterisk to a comment, all of the code in the comment turns blue instead of the normal grey. Does this do something special? There's no mention of this in the comments section of the PHP manual and searching for '/**' returns no results...
Re: The "Blue" Comments...
Posted: Sat Sep 06, 2008 7:18 pm
by califdon
That's because it has nothing to do with PHP, but everything to do with what editor you are using, which you didn't tell us.
Re: The "Blue" Comments...
Posted: Sat Sep 06, 2008 11:30 pm
by lightnb
The actual color-coding is based on the editor, yes. BUT- The editor wouldn't make /** a different color than all other comments, unless /** has some special meaning to PHP.
One asterisk is gray, three or more is gray. Two, however, is special, and I'd like to know why, and what it signifies.
Re: The "Blue" Comments...
Posted: Sun Sep 07, 2008 8:20 am
by markusn00b
lightnb wrote:The actual color-coding is based on the editor, yes. BUT- The editor wouldn't make /** a different color than all other comments, unless /** has some special meaning to PHP.
One asterisk is gray, three or more is gray. Two, however, is special, and I'd like to know why, and what it signifies.
No comments in PHP have a .. 'difference' .. really.
/* Allows you to have a multi-line comment. So:
/*
Comment
on
new lines
*/
While '//' and '#' just support single comments.
Your IDE will just simply have different styles for different comment syntax.
Re: The "Blue" Comments...
Posted: Sun Sep 07, 2008 9:51 am
by jayshields
It's probably because your editor colour codes JavaDoc style comments differently to normal comments even though you're not coding in Java. Most editors do this.
Re: The "Blue" Comments...
Posted: Sun Sep 07, 2008 12:08 pm
by s.dot
the phpdoc syntax /** */ is a token that is parsed in the php lexical analyzer (php >= 5), so maybe it's signaling a token.