Php Flow » Php

Comments In PHP

Comments are very important part of programming languages.PHP also has many types of comment declaration in code.The PHP comment syntax always begins with a special character sequence.The all code/text which is appears between the start of the comment and the end will be ignored.This is use for programmers/developers as a note or code understanding note.
There are 3 ways of commenting in PHP:

Single line comment

The single line comment tells the interpreter to ignore everything that occurs on that line to the right of the comment. This comment begin with #.
# to get data (single line comment).

Single line comment

The single line comment tells the interpreter to ignore everything that occurs on that line to the right of the comment. This comment begin with //.
// to get data (another single line comment).

Multi line comments

Below style is used for large blocks of code or writing multiple line comments. The multiple line PHP comment begins with ” /* ” and ends with ” */ “.
/*

Is this line a comment? Make a guess! ( … Alright, it is a multi-line comment.)

*/

Did you enjoy this article? Share it!

About the Author:

Hi, This is Parvez Alam from India. I am software developer with 4 years’ experience in web development. I have submitted articles on PHP, Mysql, Magento,CSS, HTML, jQuery, web designing and social API. You can subscribe to my blog via RSS/Twitter/Google plus and Facebook.

Random Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>