Comments are used in PHP to allow you to write notes to yourself during the development process. Such comments may define the purpose of a code segment or to comment blocks of code while testing scripts.
Comments are ignored by the PHP parser. PHP comments can be defined in one of the following ways:
Examples: // - simple PHP comment.
# - alternative simple PHP comment.
/*...*/ - multi-line comment blocks.
Example: Code:
<?php
// This is a simple PHP comment
# This is a second simple PHP comment
/* This is a PHP multi-line
comment block. It can span as
many lines as necessary */
?>