Concept

How are single-line and multiline comments handled in PHP?

ComputerScienceOne / Entry Point & Command Line Arguments

"37. Basics slashes is ignored. With a multiline comment, everything in between the forward slash/asterisk is ignored. Comments are ultimately ignored by the interpreter. Consider the following example. 1 //this is a single line comment 2 $x = 10; //this is also a single line comment, but after some code 3 4 /* 5 This is a comment that can 6 span multiple lines to format the comment 7 message more clearly 8 */ 9 $y = 3.14; Most code editors and IDEs will present comments in a special color or font to distinguish them from the rest of the code (just as our example above does). Failure to close a multiline comment will likely result in a fatal interpreter error but with color-coded comments its easy to see the mistake visually."

Related Ideas

How are single-line and multiline comments handled in PHP? | ComputerScienceOne | Bifalgorithm | Bifalgorithm