Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Basics Getting to Know PHP PHP Comments

Marco Caceres
Marco Caceres
4,708 Points

this answer might not be right

while watching the video related to the question, the # sign is never used. only the //, /**/, and * for a dot block are ever used. however i keep getting the questions associated with that answer wrong. If im getting it wrong i would love to find out the right one, because im getting a bit confused.

1 Answer

Steven Parker
Steven Parker
231,269 Points

:point_right: By itself, an asterisk (*) does not start a comment.

An asterisk only starts or ends a comment when combined with a slash. The asterisks on lines in a documentation block ("DocBlock") do not cause the line to be a comment. The comment is started and ended with "/*" and "*/".

The use of the pound sign (#) to start a single-line comment was not introduced in the video. It was, however, written up in the Teacher's Notes at the bottom of the page for the PHP Comments video.

Marco Caceres
Marco Caceres
4,708 Points

Thank you! Ill be sure to go over the teachers notes more often.