Making Comments

☰ Menu Content


Comment Php codes text in a script that is ignored by the PHP engine.

Comments does not appears in the browser window.

Comments can be used to make code more readable or to annotate a script.

Single-line comments begin with two forward slashes (//) or a single hash sign (#).

// this is a comment

# this is another comment

Multiline comments begin with a forward slash followed by an asterisk (/*) and end with an asterisk followed by a forward slash (*/), as in the following:

/*
this is a comment
none of this will
be parsed by the
PHP engine
*/

Use the comments !!!

Code that seems clear at the time of writing can resemble a hopeless tangle when you try to amend it six months later. Adding comments to your code as you write can save you time later and help other programmers work easily with your code.

Note
For more detail please see Php Manual at http://www.php.net

Php Tutorial Content (menu)