Comment is a part of your PHP code that will not be translated by the PHP
engine. You can use it to write documentation of your PHP script describing
what the code should do. A comment can span only for one line or span multiple
line.
PHP support three kinds of comment tags :
- //
This is a one line comment
- #
This is a Unix shell-style comment. It's also a one line comment
- /* ..... */
Use this multi line comment if you need to.
<?php
echo "First line <br>";
// You won't
see me in the output
// I'm a one liner comment
/*
Same thing, you won't
see this in the output file
*/
echo "The above comment spans two lines <br>";
# Hi i'm a Unix shell-style comment
# Too bad you can't see me
echo "View the source of this file, you'll see no comments here <br>";
?>