Can I use a hash sign (#) for commenting in PHP?

2021 UPDATE: As of PHP 8, the two characters are not the same. The sequence #[ is used for Attributes.(Thanks to i336 for the comment) Original Answer: The answer to the question Is there any difference between using “#” and “//” for single-line comments in PHP? is no. There is no difference. By looking at … Read more

Inline comments for Bash?

My preferred is: Commenting in a Bash script This will have some overhead, but technically it does answer your question echo abc `#put your comment here` \ def `#another chance for a comment` \ xyz etc And for pipelines specifically, there is a cleaner solution with no overhead echo abc | # normal comment OK … Read more

What is the meaning of #XXX in code comments?

XXX in a comment is usually a heads-up. It could be: Something that’s not implemented completely correctly. Something that should be fixed later on. Highlighting a possible problem spot. Something you’re not sure about, a question. I’ve often preferred a more descriptive tag like FIXME or TODO or HACK. XXX is often used as a … Read more

How to comment a block in Eclipse?

Ctrl–/ to toggle “//” comments and Ctrl–Shift–/ to toggle “/* */” comments. At least for Java, anyway – other tooling may have different shortcuts. Ctrl–\ will remove a block of either comment, but won’t add comments. Note: As for Eclipse CDT 4.4.2, Ctrl–Shift–/ will not uncomment a “/* */” block comment. Use Ctrl–Shift–\ in that … Read more