Comments in PHP

PHP Vidyalaya

When your programs becomes larger it is very difficult to maintain it without commenting it properly. PHP offers commenting your program in different ways.

Single-line C++ Syntax

Most often we don’t require comments which are no more than single line. In such situations we can use comments like these

Shell Syntax

Another single line syntax is known as shell syntax, which is prefaced with a hash(#). In this our previous example can be written as:

Multiple-line C Syntax
PHP also offers multiple line syntax which can be helpful in situations where our comments are much longer.

You can use any of the above syntaxes for your programs. For simple programs it may not be necessary. But when it becomes hundreds of lines of codes we may not be able to recollect what we have done last day. But if it is commented well it will be easier for us as…

View original post 21 more words


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s