Commenting
In this lesson we will look at how to write code comments in PHP.
Code Comments
In general, code should be commented prolifically. It not only helps describe the flow and intent of the code for less experienced programmers but can prove invaluable when returning to your own code months down the line. There is not a required format for comments, but the following are recommended.
DocBlock style comments preceding class, method, and property declarations so they can be picked up by IDEs:
Use single line comments within code, leaving a blank line between large comment blocks and code.