Changes

Commenting PHP Code

162 bytes added, 19:14, 24 May 2007
no edit summary
Another important reason for commenting your code is to ensure that others who may follow in your footsteps to maintain or add functionality to your creation will also benefit from reading your comments. There are few things worse in the software development business than having traverse the steep learning curve caused by the complexity of somebody else's uncommented code.
Now that we have established the the commenting code is worthwhile, we can take a look at the mechanisms provided by PHP to achieve this goal. PHP provides two commenting mechanisms - one for single line comments, and another for multi-line comments. PHP borrows its commenting conventions from other languages such as C, C++ and Java, so if you are familiar with these languages there will be no surprises here.
== PHP Single Line Comments ==